switch elvish template to new try/catch syntax
'except' has been deprecated and replaced by 'catch' in elvish 0.18, and will be removed in 0.19
This commit is contained in:
parent
17365710af
commit
3f83dbbfb8
|
|
@ -57,7 +57,7 @@ fn __zoxide_z {|@rest|
|
||||||
var path
|
var path
|
||||||
try {
|
try {
|
||||||
set path = (zoxide query --exclude $pwd -- $@rest)
|
set path = (zoxide query --exclude $pwd -- $@rest)
|
||||||
} except {
|
} catch {
|
||||||
} else {
|
} else {
|
||||||
__zoxide_cd $path
|
__zoxide_cd $path
|
||||||
}
|
}
|
||||||
|
|
@ -70,7 +70,7 @@ fn __zoxide_zi {|@rest|
|
||||||
var path
|
var path
|
||||||
try {
|
try {
|
||||||
set path = (zoxide query -i -- $@rest)
|
set path = (zoxide query -i -- $@rest)
|
||||||
} except {
|
} catch {
|
||||||
} else {
|
} else {
|
||||||
__zoxide_cd $path
|
__zoxide_cd $path
|
||||||
}
|
}
|
||||||
|
|
@ -116,4 +116,4 @@ set edit:completion:arg-completer[{{cmd}}] = $__zoxide_z_complete~
|
||||||
#
|
#
|
||||||
# eval (zoxide init elvish | slurp)
|
# eval (zoxide init elvish | slurp)
|
||||||
#
|
#
|
||||||
# Note: zoxide only supports elvish v0.17.0 and above.
|
# Note: zoxide only supports elvish v0.18.0 and above.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue