zsh-users
 help / color / mirror / code / Atom feed
* prevent some lines directly coming from the history from being executed
@ 2022-05-24 15:47 Vincent Lefevre
  2022-05-24 18:58 ` Bart Schaefer
  0 siblings, 1 reply; 23+ messages in thread
From: Vincent Lefevre @ 2022-05-24 15:47 UTC (permalink / raw)
  To: zsh-users

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@vinc17.net> - 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)


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-06-02 13:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 15:47 prevent some lines directly coming from the history from being executed Vincent Lefevre
2022-05-24 18:58 ` Bart Schaefer
2022-05-25  2:54   ` Vincent Lefevre
2022-05-25  3:59     ` Bart Schaefer
2022-05-25  8:49       ` Vincent Lefevre
2022-05-26  1:25         ` Bart Schaefer
2022-05-26 14:36           ` Vincent Lefevre
2022-05-26 15:53             ` Daniel Shahaf
2022-05-26 16:13               ` Peter Stephenson
2022-05-27 12:40                 ` Daniel Shahaf
2022-05-28  0:07                   ` Vincent Lefevre
2022-05-28 10:06                     ` Daniel Shahaf
2022-05-28 18:43                       ` Bart Schaefer
2022-05-29 22:55                         ` Daniel Shahaf
2022-05-30  4:04                           ` Bart Schaefer
2022-05-30  9:07                             ` Peter Stephenson
2022-06-02  9:59                               ` Daniel Shahaf
2022-06-02 10:19                               ` Daniel Shahaf
2022-06-02  9:59                             ` Daniel Shahaf
2022-05-30  9:02                       ` Vincent Lefevre
2022-06-02 10:17                         ` Daniel Shahaf
2022-06-02 13:54                           ` Vincent Lefevre
2022-05-26 16:37             ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).