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:
skwerlman 2022-03-30 14:48:16 -04:00 committed by GitHub
parent 17365710af
commit 3f83dbbfb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ fn __zoxide_z {|@rest|
var path
try {
set path = (zoxide query --exclude $pwd -- $@rest)
} except {
} catch {
} else {
__zoxide_cd $path
}
@ -70,7 +70,7 @@ fn __zoxide_zi {|@rest|
var path
try {
set path = (zoxide query -i -- $@rest)
} except {
} catch {
} else {
__zoxide_cd $path
}
@ -116,4 +116,4 @@ set edit:completion:arg-completer[{{cmd}}] = $__zoxide_z_complete~
#
# 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.