Skip to content

Commit baaa195

Browse files
committed
fix: use _comp_compgen for COMPREPLY+=($(compgen ...))
1 parent 7389803 commit baaa195

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

completions/fbgs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _comp_cmd_fbgs()
2424
-fp | --firstpage | -lp | --lastpage | -r | --resolution | -s | --scroll | -t | \
2525
--timeout)
2626
# expect integer value
27-
COMPREPLY+=($(compgen -W '{0..9}'))
27+
_comp_compgen -aR -- -W '{0..9}'
2828
compopt -o nospace
2929
return
3030
;;

completions/fbi

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ _comp_cmd_fbi()
1111
return
1212
;;
1313
-r | --resolution)
14-
COMPREPLY+=($(compgen -W '{1..5}'))
14+
_comp_compgen -aR -- -W '{1..5}'
1515
return
1616
;;
1717
-f | --font)

completions/feh

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ _comp_cmd_feh()
6464
--reload | --limit-height | --limit-width | --thumb-height | --thumb-width | \
6565
--thumb-redraw | --magick-timeout | -${noargopts}[RHWEyJ])
6666
# expect integer value
67-
COMPREPLY+=($(compgen -W '{0..9}'))
67+
_comp_compgen -aR -- -W '{0..9}'
6868
compopt -o nospace
6969
return
7070
;;
7171
--zoom)
7272
# expect integer value or "max", "fill"
7373
_comp_compgen -- -W 'max fill'
7474
if [[ ! $cur || ! ${COMPREPLY-} ]]; then
75-
COMPREPLY+=($(compgen -W '{0..9}'))
75+
_comp_compgen -aR -- -W '{0..9}'
7676
compopt -o nospace
7777
fi
7878
return
@@ -91,7 +91,7 @@ _comp_cmd_feh()
9191
if [[ $cur && $cur != *x* ]]; then
9292
COMPREPLY=(x)
9393
fi
94-
COMPREPLY+=($(compgen -W "{0..9}"))
94+
_comp_compgen -aR -- -W "{0..9}"
9595
compopt -o nospace
9696
return
9797
;;

completions/lintian

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ _comp_cmd_lintian__tags()
1212
for item in $search; do
1313
tags=$(command sed -e "s/\<$item\>//g" <<<"$tags")
1414
done
15-
COMPREPLY+=($(compgen -W "$tags"))
15+
_comp_compgen -aR -- -W "$tags"
1616
elif [[ $cur == *,* ]]; then
1717
_comp_compgen -ac "${cur##*,}" -- -P "${cur%,*}," -W "$tags"
1818
else
@@ -38,7 +38,7 @@ _comp_cmd_lintian__checks()
3838
checks=$(command sed -e "s/\<$name\>//g" <<<"$checks")
3939
done
4040
done
41-
COMPREPLY+=($(compgen -W "$checks"))
41+
_comp_compgen -aR -- -W "$checks"
4242
elif [[ $cur == *,* ]]; then
4343
_comp_compgen -ac "${cur##*,}" -- -P "${cur%,*}," -W "$checks"
4444
else
@@ -59,7 +59,7 @@ _comp_cmd_lintian__infos()
5959
for item in $search; do
6060
infos=$(command sed -e "s/\<$item\>//g" <<<"$infos")
6161
done
62-
COMPREPLY+=($(compgen -W "$infos"))
62+
_comp_compgen -aR -- -W "$infos"
6363
elif [[ $cur == *,* ]]; then
6464
_comp_compgen -ac "${cur##*,}" -- -P "${cur%,*}," -W "$infos"
6565
else

completions/nethogs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _comp_cmd_nethogs()
88
case "$prev" in
99
-d)
1010
# expect integer value
11-
COMPREPLY+=($(compgen -W '{0..9}'))
11+
_comp_compgen -aR -- -W '{0..9}'
1212
compopt -o nospace
1313
return
1414
;;

completions/rcs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _comp_cmd_rcs()
2121
COMPREPLY[i]=$dir$file
2222
done
2323

24-
COMPREPLY+=($(compgen -G "$dir/$file*,v"))
24+
_comp_compgen -aR -- -G "$dir/$file*,v"
2525

2626
for i in ${!COMPREPLY[*]}; do
2727
COMPREPLY[i]=${COMPREPLY[i]%,v}

completions/useradd

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _comp_cmd_useradd()
3030
;;
3131
--gid | -${noargopts}g)
3232
_gids
33-
COMPREPLY+=($(compgen -g))
33+
_comp_compgen -aR -- -g
3434
((${#COMPREPLY[@]})) &&
3535
_comp_compgen -- -W '"${COMPREPLY[@]}"'
3636
return

completions/usermod

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _comp_cmd_usermod()
2626
;;
2727
--gid | -${noargopts}g)
2828
_gids
29-
COMPREPLY+=($(compgen -g))
29+
_comp_compgen -aR -- -g
3030
((${#COMPREPLY[@]})) &&
3131
_comp_compgen -- -W '"${COMPREPLY[@]}"'
3232
return

completions/wget

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ _comp_cmd_wget()
104104
--read-timeout | --wait | --waitretry | --cut-dirs | \
105105
--max-redirect | --level | -${noargopts}[tTwl])
106106
# expect integer number
107-
COMPREPLY+=($(compgen -P "$cur" -W "{0..9}"))
107+
_comp_compgen -aR -- -P "$cur" -W "{0..9}"
108108
compopt -o nospace
109109
return
110110
;;

completions/xgamma

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ _comp_cmd_xgamma()
1717
if [[ $cur && $cur != *.* ]]; then
1818
COMPREPLY=(.)
1919
fi
20-
COMPREPLY+=($(compgen -W "{0..9}"))
20+
_comp_compgen -aR -- -W "{0..9}"
2121
compopt -o nospace
2222
return
2323
;;

0 commit comments

Comments
 (0)