Skip to content

Commit 665088a

Browse files
committed
i*: Support completing arg of last bundled short option
1 parent 1c126ff commit 665088a

File tree

8 files changed

+34
-34
lines changed

8 files changed

+34
-34
lines changed

completions/iconv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ _iconv()
66
_init_completion -s || return
77

88
case $prev in
9-
-'?'|--help|--usage|-V|--version|--unicode-subst|--byte-subst|\
10-
--widechar-subst)
9+
--help|--usage|--version|--unicode-subst|--byte-subst|\
10+
--widechar-subst|-!(-*)[?V])
1111
return
1212
;;
13-
-f|--from-code|-t|--to-code)
13+
--from-code|--to-code|-!(-*)[ft])
1414
COMPREPLY=( $( compgen -W '$( iconv -l | \
1515
command sed -e "s@/*\$@@" -e "s/[,()]//g" )' -- "$cur" ) )
1616
return
1717
;;
18-
-o|--output)
18+
--output|-!(-*)o)
1919
_filedir
2020
return
2121
;;

completions/idn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ _idn()
66
_init_completion -s || return
77

88
case $prev in
9-
-h|--help|-V|--version)
9+
--help|--version|-!(-*)[hV])
1010
return
1111
;;
12-
-p|--profile)
12+
--profile|-!(-*)p)
1313
COMPREPLY=( $( compgen -W 'Nameprep iSCSI Nodeprep Resourceprep
1414
trace SASLprep' -- "$cur" ) )
1515
return

completions/info

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ _info()
1212
fi
1313

1414
case $prev in
15-
-k|--apropos|--index-search|-n|--node|-h|--help|-v|--version)
15+
--apropos|--index-search|--node|--help|--version|-!(-*)[knhv])
1616
return
1717
;;
18-
-d)
18+
-!(-*)d)
1919
if [[ ${1##*/} == info ]]; then
2020
_filedir -d
2121
return
@@ -25,7 +25,7 @@ _info()
2525
_filedir -d
2626
return
2727
;;
28-
--dribble|-f|--file|-o|--output|--restore|-r|--raw-filename|--rcfile)
28+
--dribble|--file|--output|--restore|--raw-filename|--rcfile|-!(-*)[for])
2929
_filedir
3030
return
3131
;;

completions/interdiff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _interdiff()
66
_init_completion -s || return
77

88
case $prev in
9-
-U|--unified|-p|--strip-match|-d|--drop-context)
9+
--unified|--strip-match|--drop-context|-!(-*)[Upd])
1010
return
1111
;;
1212
esac

completions/iperf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ _iperf()
66
_init_completion -s || return
77

88
case $prev in
9-
-h|--help|-v|--version|-i|--interval|-l|--len|-p|--port|-w|--window|\
10-
-M|--mss|-b|--bandwidth|-n|--num|-t|--time|-L|--listenport|-P|\
11-
--parallel|-T|--ttl|-Z|--linux-congestion)
9+
--help|--version|--interval|--len|--port|--window|--mss|--bandwidth|\
10+
--num|--time|--listenport|--parallel|--ttl|--linux-congestion|\
11+
-!(-*)[hvilpwMbntLPTZ])
1212
return
1313
;;
14-
-f|--format)
14+
--format|-!(-*)f)
1515
COMPREPLY=( $( compgen -W 'k m K M' -- "$cur" ) )
1616
return
1717
;;
18-
-o|--output|-F|--fileinput)
18+
--output|--fileinput|-!(-*)[oF])
1919
_filedir
2020
return
2121
;;
22-
-B|--bind)
22+
--bind|-!(-*)B)
2323
_available_interfaces -a
2424
_ip_addresses
2525
return
2626
;;
27-
-c|--client)
27+
--client|-!(-*)c)
2828
_known_hosts_real -- "$cur"
2929
return
3030
;;
31-
-x|--reportexclude)
31+
--reportexclude|-!(-*)x)
3232
COMPREPLY=( $( compgen -W 'C D M S V' -- "$cur" ) )
3333
return
3434
;;
35-
-y|--reportstyle)
35+
--reportstyle|-!(-*)y)
3636
COMPREPLY=( $( compgen -W 'C' -- "$cur" ) )
3737
return
3838
;;

completions/ipmitool

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,45 @@ _ipmitool()
1212
_init_completion || return
1313

1414
case $prev in
15-
-h|-V|-p|-U|-e|-k|-y|-P|-m|-b|-t|-B|-T|-l)
15+
-*[hVpUekyPmbtBTl])
1616
return
1717
;;
18-
-d)
18+
-*d)
1919
COMPREPLY=( $( compgen -W "$( \
2020
command ls -d /dev/ipmi* /dev/ipmi/* /dev/ipmidev/* \
2121
2>/dev/null | command sed -ne 's/^[^0-9]*\([0-9]\{1,\}\)/\1/p' )" \
2222
-- "$cur" ) )
2323
return
2424
;;
25-
-I)
25+
-*I)
2626
COMPREPLY=( $( compgen -W "$( $1 -h 2>&1 | \
2727
command sed -e '/^Interfaces:/,/^[[:space:]]*$/!d' \
2828
-ne 's/^[[:space:]]\{1,\}\([^[:space:]]\{1,\}\).*/\1/p' )" \
2929
-- "$cur" ) )
3030
return
3131
;;
32-
-H)
32+
-*H)
3333
_known_hosts_real -- "$cur"
3434
return
3535
;;
36-
-f|-S|-O)
36+
-*[fSO])
3737
_filedir
3838
return
3939
;;
40-
-C)
40+
-*C)
4141
COMPREPLY=( $( compgen -W '{0..14}' -- "$cur" ) )
4242
return
4343
;;
44-
-L)
44+
-*L)
4545
COMPREPLY=( $( compgen -W 'CALLBACK USER OPERATOR ADMINISTRATOR' \
4646
-- "$cur" ) )
4747
return
4848
;;
49-
-A)
49+
-*A)
5050
COMPREPLY=( $( compgen -W 'NONE PASSWORD MD2 MD5 OEM' -- "$cur" ) )
5151
return
5252
;;
53-
-o)
53+
-*o)
5454
COMPREPLY=( $( compgen -W "$( $1 -o list 2>&1 | \
5555
awk '/^[ \t]+/ { print $1 }' ) list" -- "$cur" ) )
5656
return

completions/ipv6calc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ _ipv6calc()
66
_init_completion -s || return
77

88
case "$prev" in
9-
-d|--debug)
9+
--debug|-!(-*)d)
1010
return
1111
;;
12-
-I|--in|-O|--out|-A|--action)
12+
--in|--out|--action|-!(-*)[IOA])
1313
# With ipv6calc < 0.73.0, -m does nothing here, so use sed instead.
1414
COMPREPLY=( $( compgen -W "$( $1 "$prev" -h 2>&1 | \
1515
command sed -ne 's/^[[:space:]]\{1,\}\([^[:space:]:]\{1,\}\)[[:space:]]*:.*/\1/p' )" \

completions/iscsiadm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ _iscsiadm()
66
_init_completion -s || return
77

88
case $prev in
9-
-m|--mode)
9+
--mode|-!(-*)m)
1010
COMPREPLY=( $( compgen -W 'discovery node session iface fw host' \
1111
-- "$cur" ) )
1212
return
1313
;;
14-
-o|--op)
14+
--op|-!(-*)o)
1515
COMPREPLY=( $( compgen -W 'new delete update show' -- "$cur" ) )
1616
return
1717
;;
18-
-t|--type)
18+
--type|-!(-*)t)
1919
COMPREPLY=( $( compgen -W 'sendtargets st slp isns fw' -- "$cur" ) )
2020
return
2121
;;
22-
-L|-U|--loginall|--logoutall)
22+
--loginall|--logoutall|-!(-*)[LU])
2323
COMPREPLY=( $( compgen -W 'all manual automatic' -- "$cur" ) )
2424
return
2525
;;

0 commit comments

Comments
 (0)