ksh (vi mode): discard line after editing with fc?

2014-04-22 Thread Alessandro DE LAURENZIS
Hello, I'm wondering how I could discard (not execute) a line after having loaded it into vi (fc -e vi, or "v" for brevity in vi-mode). :wq, :q, :q! - all of them execute the line. I'm feeling really stupid... -- Alessandro DE LAURENZIS [mailto:just22@gmail.com] LinkedIn: http://it.linkedi

Re: ksh (vi mode): discard line after editing with fc?

2014-04-22 Thread Stefan Johnson
I've always just tossed a comment onto the line before exiting vi edit mode to prevent execution... On Tue, Apr 22, 2014 at 2:46 PM, Alessandro DE LAURENZIS < just22@gmail.com> wrote: > Hello, > > I'm wondering how I could discard (not execute) a line after having > loaded it into vi (fc -e

Re: ksh (vi mode): discard line after editing with fc?

2014-04-22 Thread Adam Thompson
On April 22, 2014 3:50:48 PM CDT, Stefan Johnson wrote: >I've always just tossed a comment onto the line before exiting vi edit >mode >to prevent execution... > > >On Tue, Apr 22, 2014 at 2:46 PM, Alessandro DE LAURENZIS < >just22@gmail.com> wrote: > >> Hello, >> >> I'm wondering how I could

Re: ksh (vi mode): discard line after editing with fc?

2014-04-22 Thread Anthony J. Bentley
Alessandro DE LAURENZIS writes: > Hello, > > I'm wondering how I could discard (not execute) a line after having > loaded it into vi (fc -e vi, or "v" for brevity in vi-mode). > > :wq, :q, :q! - all of them execute the line. > > I'm feeling really stupid... The file initially contains the origi

Re: ksh (vi mode): discard line after editing with fc?

2014-04-23 Thread Andy Bradford
Thus said Alessandro DE LAURENZIS on Tue, 22 Apr 2014 21:46:57 +0200: > I'm wondering how I could discard (not execute) a line after having > loaded it into vi (fc -e vi, or "v" for brevity in vi-mode). Delete the command like you would any other line in vi that you don't want saved anymore