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

Proposed feature: Selectively avoid adding to history (with code)



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



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