mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
per-directory-history: update to latest version (0e090e8)
This commit is contained in:
parent
934615480e
commit
52afbf77f6
1 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue