diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-03-03 20:32:59 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-03-03 20:32:59 +0100 |
commit | 52afbf77f63844abd719e565a15af2c34075de7f (patch) | |
tree | 778a93c3e2114621ed27d205b9b09c385e54b92f /plugins/per-directory-history | |
parent | 934615480e8a008deda1a5330d8fbd47815b7cf4 (diff) | |
download | zsh-52afbf77f63844abd719e565a15af2c34075de7f.tar.gz zsh-52afbf77f63844abd719e565a15af2c34075de7f.tar.bz2 zsh-52afbf77f63844abd719e565a15af2c34075de7f.zip |
per-directory-history: update to latest version (0e090e8)
Diffstat (limited to 'plugins/per-directory-history')
-rw-r--r-- | plugins/per-directory-history/per-directory-history.zsh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/per-directory-history/per-directory-history.zsh b/plugins/per-directory-history/per-directory-history.zsh index 53ad963e7..41de2f91d 100644 --- a/plugins/per-directory-history/per-directory-history.zsh +++ b/plugins/per-directory-history/per-directory-history.zsh @@ -26,7 +26,7 @@ # # [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html # [2]: http://dieter.plaetinck.be/per_directory_bash -# [3]: https://www.zsh.org/mla/users/1997/msg00226.html +# [3]: http://www.zsh.org/mla/users/1997/msg00226.html # ################################################################################ # @@ -109,8 +109,13 @@ function _per-directory-history-change-directory() { } function _per-directory-history-addhistory() { - print -Sr -- "${1%%$'\n'}" - fc -p $_per_directory_history_directory + # respect hist_ignore_space + if [[ -o hist_ignore_space ]] && [[ "$1" == \ * ]]; then + true + else + print -Sr -- "${1%%$'\n'}" + fc -p $_per_directory_history_directory + fi } |