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

Re: Intercepting commands before they're run



Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:

> > } [...] maybe we should let preexec return an exit code to say the command
> > } should not be run [...]
> > 
> > I think I suggested that at one point, but I don't recall whether there
> > was any discussion.
> 
> My worry about this (and similar schemes with hooks) is that it's a
> little bit too easy for the user to get into a state where the shell
> won't do anything at all.  Aside from that it's a reasonable idea
> and wouldn't take much writing.

There could be a special hack, so that "command" always worked.  So as
a last resort, a user could just do "command zsh -f" and try to
recover.



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