mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-25 05:57:34 +00:00
Add check for precmd_function before adding to it
This commit is contained in:
parent
32ed84c27e
commit
c88210ccce
@ -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 New Issue
Block a user