Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Does zsh have anything like readline's edit-and-execute-command ?



On May 6,  6:26pm, Robin Lee Powell wrote:
} 
} That is, something that loads the line I'm editing into $EDITOR or
} so, lets me edit it, and then runs it when I'm done?

The bash behavior of this is IMO rather strange when at the PS2 prompt.
It executes the command immediately and then returns to the PS2 prompt
with the outer construct still in progress.

That could be implemented with a shell function widget in zsh, but has
not been.  Instead zsh has edit-command-line, which puts the entire
multi-line construct into the editor, but then returns you to the PS1
prompt where you have to press enter (accept-line) to run the command.

Look in the manual under User Contributions / ZLE Functions.



Messages sorted by: Reverse Date, Date, Thread, Author