3

I have a problem with Geany. I can set a keyboard shortcut to send selection to the terminal. But these line are just copied on the terminal, not executed. So, if you select this line:

R

and send it to the terminal, R is not actually executed, instead the letter R appears in the terminal prompt. If I press "enter" then R is launched. How can I make that last "enter" be automatically send to the terminal together with the selection?

Is there a keyboard shortcut to send and execute the selection in the terminal?

user2413
  • 14,337
  • 1
    No, as with 1.27 there isn't. You could define a shell script which is executing what it's receiving as via STDIN and configure it for the send selection to feature. – frlan Apr 27 '16 at 07:12
  • 1
    @frlan: is this solution easy to do; could you add this as an answer? – user2413 Apr 27 '16 at 07:37

2 Answers2

4

Changing send_selection_unsafe=false to send_selection_unsafe=true in the geany.conf file (~/.config/geany/geany.conf) fixed this for me.

Zanna
  • 70,465
Dries
  • 106
  • 2
1

I am not familiar with geany so I could be wrong here but you probably need to add CrLf to the end of the line. Most programs this can be specified with \r\n maybe that will help.

MttJocy
  • 692
  • \r is an escape sequence that represents the carriage return character \n represents a new line character also called line feed, both are used due to historical typewriters where they were two separate operations. – MttJocy Apr 26 '16 at 19:10