zsh-workers
 help / color / mirror / code / Atom feed
* Proposed feature: Selectively avoid adding to history (with code)
@ 2010-02-22 17:42 Richard Hartmann
  2010-02-23  2:47 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Hartmann @ 2010-02-22 17:42 UTC (permalink / raw)
  To: zsh-workers

Hi all,

I am running this function. It's a bit like HIST_IGNORE_SPACE just without
leading whitespace.

  zshaddhistory(){if [[ -n $FOO ]]; then return 1; fi}

If you set $FOO, you will not save anything to your history. If you unset
it, you will save again.
This allows me to modify my prompt, giving a visual clue that I am in
try-out mode and will not put random testing stuff into my history.

The control variable is deliberately named $FOO because I wanted to ask:

1) If anyone else thinks this is useful and if it should be a _function
2) If "$HIST_NO_STORE" is a good variable name
3) If this would be better handled in an option


Thanks,
Richard


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

end of thread, other threads:[~2010-02-23  9:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-22 17:42 Proposed feature: Selectively avoid adding to history (with code) Richard Hartmann
2010-02-23  2:47 ` Bart Schaefer
2010-02-23  7:57   ` Mikael Magnusson
2010-02-23  9:42     ` Richard Hartmann
2010-02-23  9:41   ` Richard Hartmann

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).