fix(tmux-sessionizer): unbound variable bug
This commit is contained in:
parent
0b7e18a3f5
commit
202f7e4558
1 changed files with 3 additions and 3 deletions
|
@ -13,11 +13,11 @@ let
|
|||
options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*")
|
||||
|
||||
if [[ -z $options ]]; then
|
||||
return 1
|
||||
exit 1
|
||||
elif [[ $(wc -l <<< "$options") -eq 1 ]]; then
|
||||
selected="$options"
|
||||
else
|
||||
echo "$options" | fzf --query="$*"
|
||||
selected=$(echo "$options" | fzf --query="$*")
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
|
|
Loading…
Reference in a new issue