Re: Bash stays in the secondary prompt (PS2) after completing a command with `edit-and-execute-command'

2017-05-13 Thread Eduardo Bustamante
On Fri, May 12, 2017 at 10:29 AM, Chet Ramey wrote: [...] > Because it doesn't say the equivalent of "execute the current command > line" (as newline does), it's a standard editing command that continues > with the current line buffer. The only thing that gets executed are the > contents of the te

How to call a bash-func from readline? && how to call rl-func from bash?

2017-05-13 Thread L A Walsh
How might one programatically call a bash function from readline, and pass information from that function back into readline? Also, is it possible to define a readline function, or only use predefined ones? Ex: On a keypress, I would like to be able to redefine that key in ".bashrc" and have i

Re: How to call a bash-func from readline? && how to call rl-func from bash?

2017-05-13 Thread Eduardo Bustamante
On Sat, May 13, 2017 at 5:14 PM, L A Walsh wrote: > How might one programatically call a bash > function from readline, and pass information from that function > back into readline? For that, you'd use a combination of `bind -x', READLINE_LINE and READLINE_POINT. For example, if you wanted a key

Re: How to call a bash-func from readline? && how to call rl-func from bash?

2017-05-13 Thread L A Walsh
Eduardo Bustamante wrote: For that, you'd use a combination of `bind -x', READLINE_LINE and READLINE_POINT. For example, if you wanted a key sequence to uppercase the whole rl_line_buffer (READLINE_LINE), then you'd: You can do a lot of things with these two alone. I guess you can emulate