Fix cding home when no matching directory in fish (#64)

Fix `cd`ing into `$HOME` when no match is found in `fish` shell
This commit is contained in:
Cole Helbling 2020-04-10 21:39:34 -07:00 committed by GitHub
parent 0d860503ae
commit 58969e22a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Interactive mode in `zoxide` no longer throws an error if `fzf` exits gracefully.
- Canonicalize to regular paths instead of UNC paths on Windows.
### Fixed
- `fish` no longer `cd`s to the user's home when no match is found.
## [0.3.1] - 2020-04-03
### Added

View File

@ -164,7 +164,7 @@ function {}
set -l IFS ''
set -l result (zoxide query $argv)
if test -d $result
if test -d $result; and string length -q -- $result
_z_cd $result
or return $status
else if test -n "$result"