Skip to content

Commit 7389803

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

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

completions/_mount.linux

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _comp_cmd_mount()
3232
return
3333
;;
3434
-p | --pass-fd)
35-
COMPREPLY=($(compgen -W '{0..9}'))
35+
_comp_compgen -R -- -W '{0..9}'
3636
compopt -o nospace
3737
return
3838
;;

completions/feh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _comp_cmd_feh()
2323
--font | --menu-font | --title-font | -${noargopts}[eM@])
2424
# expect string like "dejavu.ttf/12"
2525
if [[ $cur == */* ]]; then # expect integer value
26-
COMPREPLY=($(compgen -P "$cur" -W '{0..9}'))
26+
_comp_compgen -R -- -P "$cur" -W '{0..9}'
2727
compopt -o nospace
2828
return
2929
fi

completions/hping2

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ _comp_cmd_hping2()
1717
return
1818
;;
1919
--tos | -${noargopts}o)
20-
COMPREPLY=($(compgen -W '02 04 08 10'))
20+
_comp_compgen -R -- -W '02 04 08 10'
2121
return
2222
;;
2323
--file | -${noargopts}E)

completions/tar

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ _comp_cmd_tar__mode()
308308
generated+=" $filler$cur$c"
309309
done
310310

311-
COMPREPLY=($(compgen -W "$generated"))
311+
_comp_compgen -R -- -W "$generated"
312312
return 0
313313
fi
314314

@@ -331,7 +331,7 @@ _comp_cmd_tar__mode()
331331
generated+=" $cur$c"
332332
done
333333

334-
COMPREPLY=($(compgen -W "$generated"))
334+
_comp_compgen -R -- -W "$generated"
335335

336336
return 0
337337
}

completions/wget

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ _comp_cmd_wget()
111111
--quota | --limit-rate | --warc-max-size | -${noargopts}Q)
112112
# expect size
113113
if [[ $cur == *[km] ]]; then
114-
COMPREPLY=($(compgen -W "$cur"))
114+
_comp_compgen -R -- -W "$cur"
115115
elif [[ $cur ]]; then
116-
COMPREPLY=($(compgen -P "$cur" -W "{0..9} k m"))
116+
_comp_compgen -R -- -P "$cur" -W "{0..9} k m"
117117
compopt -o nospace
118118
else
119-
COMPREPLY=($(compgen -W "{0..9}"))
119+
_comp_compgen -R -- -W "{0..9}"
120120
compopt -o nospace
121121
fi
122122
return

completions/xgamma

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _comp_cmd_xgamma()
2626
if [[ $cur == :* && $cur != :*.* ]]; then
2727
# FIXME: where to get local display numbers?
2828
local display=${cur#:}
29-
COMPREPLY=($(compgen -W "${display:-0}."))
29+
_comp_compgen -R -- -W "${display:-0}."
3030
compopt -o nospace
3131
elif [[ $cur == :*.* ]]; then
3232
# local screen numbers

0 commit comments

Comments
 (0)