Skip to content

Commit a0973d7

Browse files
committed
fix(upgradepkg): use _comp_compgen for _comp_cmd_upgradepkg
1 parent 05e70ed commit a0973d7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

completions/upgradepkg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ _comp_cmd_upgradepkg()
1313
if [[ $cur == ?*%* ]]; then
1414
prev="${cur%%?(\\)%*}"
1515
cur="${cur#*%}"
16-
local nofiles="" IFS=$'\n'
16+
local nofiles=""
1717
compopt -o filenames
18-
COMPREPLY=($(compgen -P "$prev%" -f -X "!*.@(t[bgxl]z)" -- "$cur"))
19-
[[ ${COMPREPLY-} ]] || nofiles=set
18+
_comp_compgen -- -P "$prev%" -f -X "!*.@(t[bgxl]z)" || nofiles=set
2019
_comp_compgen -a -- -P "$prev%" -S '/' -d
2120
[[ $nofiles ]] && compopt -o nospace
2221
return

0 commit comments

Comments
 (0)