mirror of
https://github.com/Hopiu/zoxide.git
synced 2026-04-28 10:34:56 +00:00
Add check for precmd_function before adding to it
This commit is contained in:
parent
32ed84c27e
commit
c88210ccce
1 changed files with 3 additions and 1 deletions
|
|
@ -4,7 +4,9 @@ _zoxide_precmd() {
|
|||
zoxide add
|
||||
}
|
||||
|
||||
precmd_functions+=_zoxide_precmd
|
||||
[[ -n "${precmd_functions[(r)_zoxide_precmd]}" ]] || {
|
||||
precmd_functions+=_zoxide_precmd
|
||||
}
|
||||
|
||||
z() {
|
||||
if [ $# -ne 0 ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue