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

prevent some lines directly coming from the history from being executed



Hi,

Some lines coming from the history may be "dangerous", in the sense
that one may not want to executed them by mistake (e.g. for lines
recalled with a quick Ctrl-R ... [Return]).

Is there some mechanism to prevent such lines from being executed if
they were not modified after recalling them from the history? E.g.
something like a hook that would inspect such lines and return 0 or 1,
depending on what one wants to do.

Note: I do not want to blacklist such lines from the history.
That is, such lines should still be there in the history to make
sense, but they need some kind of confirmation before execution.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




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