Skip to content

Commit 7573f16

Browse files
committed
refactor(upgradepkg): turn nofiles into a boolean variable
1 parent cf758e0 commit 7573f16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

completions/upgradepkg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ _upgradepkg()
1414
if [[ $cur == ?*%* ]]; then
1515
prev="${cur%%?(\\)%*}"
1616
cur="${cur#*%}"
17-
local nofiles="" IFS=$'\n'
17+
local nofiles=false IFS=$'\n'
1818
compopt -o filenames
1919
COMPREPLY=($(compgen -P "$prev%" -f -X "!*.@(t[bgxl]z)" -- "$cur"))
20-
[[ ${COMPREPLY-} ]] || nofiles=1
20+
[[ ${COMPREPLY-} ]] || nofiles=true
2121
COMPREPLY+=($(compgen -P "$prev%" -S '/' -d -- "$cur"))
22-
[[ $nofiles ]] && compopt -o nospace
22+
"$nofiles" && compopt -o nospace
2323
return
2424
fi
2525

0 commit comments

Comments
 (0)