Skip to content

Commit 87509ba

Browse files
committed
fix: use _comp_compgen for COMPREPLY+=($(compgen ... -- "$cur"))
1 parent 5701a79 commit 87509ba

File tree

22 files changed

+40
-40
lines changed

22 files changed

+40
-40
lines changed

completions/_mount.linux

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ _comp_cmd_mount()
8686
{,no}user users' -- "$cur"))
8787
case "$fstype" in
8888
adfs | auto)
89-
COMPREPLY+=($(compgen -W '{u,g}id= {own,oth}mask=' -- "$cur"))
89+
_comp_compgen -a -- -W '{u,g}id= {own,oth}mask='
9090
;;&
9191
affs | auto)
9292
COMPREPLY+=($(compgen -W '{u,g}id= set{u,g}id= mode= protect
@@ -145,7 +145,7 @@ _comp_cmd_mount()
145145
iocharset= utf8' -- "$cur"))
146146
;;&
147147
jffs2 | auto)
148-
COMPREPLY+=($(compgen -W 'compr= rp_size=' -- "$cur"))
148+
_comp_compgen -a -- -W 'compr= rp_size='
149149
;;&
150150
jfs | auto)
151151
COMPREPLY+=($(compgen -W 'iocharset= resize= {,no}integrity
@@ -175,7 +175,7 @@ _comp_cmd_mount()
175175
{,no}compression debug no_detach' -- "$cur"))
176176
;;&
177177
proc | auto)
178-
COMPREPLY+=($(compgen -W '{u,g}id=' -- "$cur"))
178+
_comp_compgen -a -- -W '{u,g}id='
179179
;;&
180180
reiserfs | auto)
181181
COMPREPLY+=($(compgen -W 'conv hash= {,no_un}hashed_relocation

completions/asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
_comp_xfunc_asciidoc_doctype()
44
{
5-
COMPREPLY+=($(compgen -W 'article book manpage' -- "$cur"))
5+
_comp_compgen -a -- -W 'article book manpage'
66
}
77

88
_comp_deprecate_func _asciidoc_doctype _comp_xfunc_asciidoc_doctype

completions/carton

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _comp_cmd_carton__commands()
1010
_comp_cmd_carton__command_help()
1111
{
1212
local help=$(PERLDOC_PAGER=cat PERLDOC=-otext "${1:-carton}" -h "$2" 2>&1)
13-
COMPREPLY+=($(compgen -W '$help' -- "$cur"))
13+
_comp_compgen -a -- -W '$help'
1414
}
1515

1616
_comp_cmd_carton()
@@ -58,7 +58,7 @@ _comp_cmd_carton()
5858
--without)
5959
if [[ $command == install ]]; then
6060
local phases="configure build test runtime develop"
61-
COMPREPLY+=($(compgen -W '$phases' -- "$cur"))
61+
_comp_compgen -a -- -W '$phases'
6262
return
6363
fi
6464
;;

completions/chronyc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ _comp_cmd_chronyc__command_args()
99
\<address\>) _known_hosts_real -- "$cur" ;;
1010
\<*) ;;
1111
*) ((${#args[@]})) &&
12-
COMPREPLY+=($(compgen -W '"${args[@]}"' -- "$cur")) ;;
12+
_comp_compgen -a -- -W '"${args[@]}"' ;;
1313
esac
1414
}
1515

completions/dnssec-keygen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _comp_cmd_dnssec_keygen__optarg()
66
command sed -e 's/|/ /g' -e 's/(.*//' \
77
-ne '/^[[:space:]]*'"$2"'/,/^[[:space:]]*[(-]/p' |
88
command sed -e 's/^[[:space:]]*'"$2"'.*://' -e '/^[[:space:]]*-/d')
9-
COMPREPLY+=($(compgen -W '$args' -- "$cur"))
9+
_comp_compgen -a -- -W '$args'
1010
}
1111

1212
_comp_cmd_dnssec_keygen()

completions/feh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ _comp_cmd_feh()
5252
if [[ $theme_name == '#'* || $theme_name == "" ]]; then
5353
continue
5454
fi
55-
COMPREPLY+=($(compgen -W "$theme_name" -- "$cur"))
55+
_comp_compgen -a -- -W "$theme_name"
5656
done <"$conf_path"
5757
return
5858
;;
@@ -83,7 +83,7 @@ _comp_cmd_feh()
8383
;;
8484
--bg | -${noargopts}b)
8585
_comp_compgen_filedir
86-
COMPREPLY+=($(compgen -W 'trans' -- "$cur"))
86+
_comp_compgen -a -- -W 'trans'
8787
return
8888
;;
8989
--geometry | --max-dimension | --min-dimension | -${noargopts}g)

completions/find

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ _comp_cmd_find()
2828
-fstype)
2929
_fstypes
3030
[[ $OSTYPE == *bsd* ]] &&
31-
COMPREPLY+=($(compgen -W 'local rdonly' -- "$cur"))
31+
_comp_compgen -a -- -W 'local rdonly'
3232
return
3333
;;
3434
-gid)

completions/ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ _comp_cmd_ip()
128128
show)
129129
if ((cword == subcword + 1)); then
130130
_available_interfaces
131-
COMPREPLY+=($(compgen -W 'dev group up' -- "$cur"))
131+
_comp_compgen -a -- -W 'dev group up'
132132
elif [[ $prev == dev ]]; then
133133
_available_interfaces
134134
elif [[ $prev == group ]]; then

completions/lintian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ _comp_cmd_lintian__tags()
1616
elif [[ $cur == *,* ]]; then
1717
COMPREPLY+=($(compgen -P "${cur%,*}," -W "$tags" -- "${cur##*,}"))
1818
else
19-
COMPREPLY+=($(compgen -W "$tags" -- "$cur"))
19+
_comp_compgen -a -- -W "$tags"
2020
fi
2121
}
2222

@@ -42,7 +42,7 @@ _comp_cmd_lintian__checks()
4242
elif [[ $cur == *,* ]]; then
4343
COMPREPLY+=($(compgen -P "${cur%,*}," -W "$checks" -- "${cur##*,}"))
4444
else
45-
COMPREPLY+=($(compgen -W "$checks" -- "$cur"))
45+
_comp_compgen -a -- -W "$checks"
4646
fi
4747
}
4848

@@ -63,7 +63,7 @@ _comp_cmd_lintian__infos()
6363
elif [[ $cur == *,* ]]; then
6464
COMPREPLY+=($(compgen -P "${cur%,*}," -W "$infos" -- "${cur##*,}"))
6565
else
66-
COMPREPLY+=($(compgen -W "$infos" -- "$cur"))
66+
_comp_compgen -a -- -W "$infos"
6767
fi
6868
}
6969

completions/lspci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _comp_cmd_lspci()
2323
return
2424
;;
2525
-*H)
26-
COMPREPLY+=($(compgen -W "1 2" -- "$cur"))
26+
_comp_compgen -a -- -W "1 2"
2727
return
2828
;;
2929
-*F)

0 commit comments

Comments
 (0)