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
|
zoxide add
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd_functions+=_zoxide_precmd
|
[[ -n "${precmd_functions[(r)_zoxide_precmd]}" ]] || {
|
||||||
|
precmd_functions+=_zoxide_precmd
|
||||||
|
}
|
||||||
|
|
||||||
z() {
|
z() {
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue