[Geany] Send selection&newline to terminal
nick.treleaven at xxxxx
Mon Dec 7 17:00:03 UTC 2009
On Sat, 28 Nov 2009 12:24:27 +0100
Enrico Tröger <enrico.troeger at uvena.de> wrote:
> >When working with R files, in order to use "Send selection to
> >terminal" one would want to append a newline to the selection. While
> >this can often be done manually in the written code, it can get
> >awkward to do so when in need to execute only one line from the middle
> >of a paragraph.
> Well, I think it's a great feature that line breaks are not added
> magically. This could do much harm if one selects something like "rm
> -rf ~" (not the most originally example but still).
> I really think if the user really wants to execute this selection,
> he/she should either include the line break or hit Enter/Return
> manually in the terminal. Automatically executing commands is always
Personally I think the unchanged selection could be sent to the
terminal. After all, the current behaviour allows multiple lines to be
sent, so with:
./foo is already executed.
I understand the possibly harmful consequences, but I'm not sure they
are particularly likely.
Another option would be to popup a dialog to confirm the selection
being sent, so the user wouldn't have to focus the terminal and press
enter and focus the editor again, just press enter for an 'Execute'
P.S. I will move this command's menu item to the new Commands menu as
it's not really formatting related.
More information about the Users