mirror of
https://github.com/junegunn/fzf
synced 2024-10-30 09:20:14 +00:00
Gnu [
evaluates both sides of a -o condition regardless
It doesn't short circuit like we expect, causing trouble when $dir is empty Use shell builtin instead
This commit is contained in:
parent
053af9a1c8
commit
93e0a6a9de
@ -44,7 +44,7 @@ __fzf_generic_path_completion() {
|
||||
setopt localoptions nonomatch
|
||||
dir="$base"
|
||||
while [ 1 ]; do
|
||||
if [ -z "$dir" -o -d ${~dir} ]; then
|
||||
if [[ -z "$dir" || -d ${~dir} ]]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[ -z "$dir" ] && dir='.'
|
||||
|
Loading…
Reference in New Issue
Block a user