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

Re: s/pattern/pattern/g on the commandline ?

On Tue, 28 Feb 2012, Jérémie Roquet wrote:

> > is there a way the prevent execution of the altered commandline when
> > coming back from fc?
> Not that I know of. Maybe someone else on the list could help…

It depends on what is wanted ... 'Just don't do anything' (without error)
can be done by saving just a single Line of ':'.
And if you have 'jobcontrol', hitting ^Z stopps the editor and thereby
looses the conection between the tempfile of fc and command execution.
Seemingly a non-zero-returnconde of the editor prevents execution,
so exiting e.g. 'vim' by ':cq' (setting retcode = 1) does this.

BUT I never fond out, how to put the edited lines into the history
BUT NOT EXCUTE them (once I'm in the editor by fc...).
So in this case I always saved to some other place and aborted editing.


Christoph von Stuckrad      * * |nickname |Mail <stucki@xxxxxxxxxxxxxxx> \
Freie Universitaet Berlin   |/_*|'stucki' |Tel(Mo.,Mi.):+49 30 838-75 459|
Mathematik & Informatik EDV |\ *|if online|  (Di,Do,Fr):+49 30 77 39 6600|
Takustr. 9 / 14195 Berlin   * * |on IRCnet|Fax(home):   +49 30 77 39 6601/

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