Avoid showing traceback in z and zi
This commit is contained in:
parent
e83475181e
commit
b3e7c67512
|
|
@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- Elvish: errors on 0.16.0.
|
||||
- Elvish: unable to `z` into directories by path.
|
||||
- Elvish: don't show traceback when `z` or `zi` fails.
|
||||
|
||||
## [0.7.4] - 2020-08-15
|
||||
|
||||
|
|
|
|||
|
|
@ -52,14 +52,26 @@ fn __zoxide_z [@rest]{
|
|||
} elif (and ('builtin:==' (builtin:count $rest) 1) (path:is-dir &follow-symlink=$true $rest[0])) {
|
||||
__zoxide_cd $rest[0]
|
||||
} else {
|
||||
__zoxide_cd (zoxide query --exclude $pwd -- $@rest)
|
||||
var path
|
||||
try {
|
||||
path = (zoxide query --exclude $pwd -- $@rest)
|
||||
} except {
|
||||
} else {
|
||||
__zoxide_cd $path
|
||||
}
|
||||
}
|
||||
}
|
||||
edit:add-var __zoxide_z~ $__zoxide_z~
|
||||
|
||||
# Jump to a directory using interactive search.
|
||||
fn __zoxide_zi [@rest]{
|
||||
__zoxide_cd (zoxide query -i -- $@rest)
|
||||
var path
|
||||
try {
|
||||
path = (zoxide query -i -- $@rest)
|
||||
} except {
|
||||
} else {
|
||||
__zoxide_cd $path
|
||||
}
|
||||
}
|
||||
edit:add-var __zoxide_zi~ $__zoxide_zi~
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue