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

Re: zsh exits suddenly.

On Jun 25, 10:33am, Peter Stephenson wrote:
} Subject: Re: zsh exits suddenly.
} The proper use of inerrflush() is when lexing the line just input.
} I've found the difference: it's in a case like this:
} % print !!:s/foo/bar/<ESC><RET>
} print haha
} The current code gives an error message for the substitution (assuming
} of course there was no `foo' in the previous line), but prints `haha'
} anyway.  Without the lastc stuff, the `print haha' is discarded along
} with the rest of the previous line.
} So the question boils down to:  after a history subsitution failure,
} should the rest of the input be discarded, or just the rest of the
} line as at present?  (Note parsing failures don't flush the input in
} any case [...]

Aha.  I think both substitution errors -and- parsing failures ought to
consume the entire remainder of the input.   Consider what happens if
the statement following the error is something destructive like a "rm",
which was e.g. expected to happened in a different directory.

It's also probably a good idea in light of the strange way the results
end up in the history on a parse error.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

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