1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

users/19800: more help for $HISTORY_IGNORE

This commit is contained in:
Peter Stephenson 2015-02-03 17:12:41 +00:00
parent 1f62d8d0be
commit 79378d4acd
2 changed files with 21 additions and 4 deletions

View file

@ -4,6 +4,8 @@
2015-02-03 Peter Stephenson <p.stephenson@samsung.com>
* users/19800: Doc/Zsh/params.yo: more help on $HISTORY_IGNORE.
* 34455: Src/Modules/db_gdbm.c: some further parameter bug fixes
including memory leak and unsetting old parameter too late.

View file

@ -1052,10 +1052,25 @@ item(tt(HISTORY_IGNORE))(
If set, is treated as a pattern at the time history files are written.
Any potential history entry that matches the pattern is skipped. For
example, if the value is `tt(fc *)' then commands that invoke the
interactive history editor are never written to the history file (compare
the tt(HIST_NO_STORE) option or the tt(zshaddhistory) hook, either of
which would prevent such commands from being added to the interactive
history at all).
interactive history editor are never written to the history file.
Note that tt(HISTORY_IGNORE) defines a single pattern: to
specify alternatives use the `tt(+LPAR()first|second|...+RPAR())'
syntax.
Compare the tt(HIST_NO_STORE) option or the tt(zshaddhistory) hook,
either of which would prevent such commands from being added to the
interactive history at all. If you wish to use tt(HISTORY_IGNORE) to
stop history being added in the first place, you can define the
following hook:
example(zshaddhistory+LPAR()RPAR() {
emulate -L zsh
## uncomment if HISTORY_IGNORE
## should use EXTENDED_GLOB syntax
# setopt extendedglob
[[ $1 != ${~HISTORY_IGNORE} ]]
})
)
vindex(HISTSIZE)
item(tt(HISTSIZE) <S>)(