fixup! fixup! fixup! Fix `cd`ing home when no matching directory in `fish`

This commit is contained in:
Cole Helbling 2020-04-10 21:34:43 -07:00
parent 59f2a68d8d
commit a63723e7a7
No known key found for this signature in database
GPG Key ID: B37E0F2371016A4C
1 changed files with 5 additions and 1 deletions

View File

@ -160,11 +160,15 @@ function {}
or return $status or return $status
else else
# FIXME: use string-collect from fish 3.1.0 once it has wider adoption
set -l IFS ''
set -l result (zoxide query $argv) set -l result (zoxide query $argv)
if begin; test -d $result; and string length -q -- $result; end if test -d $result; and string length -q -- $result
_z_cd $result _z_cd $result
or return $status or return $status
else if test -n "$result"
echo $result
end end
end end
end end