Skip to content

Commit 1c126ff

Browse files
committed
h*: Support completing arg of last bundled short option
1 parent 3f90f09 commit 1c126ff

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

completions/hddtemp

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

88
case $prev in
9-
-f|--file)
9+
--file|-!(-*)f)
1010
_filedir db
1111
return
1212
;;
13-
-l|--listen)
13+
--listen|-!(-*)l)
1414
_ip_addresses
1515
return
1616
;;
17-
-u|--unit)
17+
--unit|-!(-*)u)
1818
COMPREPLY=( $( compgen -W 'C F' -- "$cur" ) )
1919
return
2020
;;
21-
-p|--port|-s|--separator|-S|--syslog|-v|--version|-h|-\?|--help)
21+
--port|--separator|--syslog|--version|--help|-!(-*)[psSvh?])
2222
return
2323
;;
2424
esac

completions/hostname

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

88
case $prev in
9-
-h|--help|-V|--version)
9+
--help|--version|-!(-*)[hV])
1010
return
1111
;;
12-
-F|--file)
12+
--file|-!(-*)F)
1313
_filedir
1414
return
1515
;;

completions/hping2

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

88
case $prev in
9-
-I|--interface)
9+
--interface|-!(-*)I)
1010
_available_interfaces
1111
return
1212
;;
13-
-a|--spoof)
13+
--spoof|-!(-*)a)
1414
_known_hosts_real -- "$cur"
1515
return
1616
;;
17-
-o|--tos)
17+
--tos|-!(-*)o)
1818
COMPREPLY=( $( compgen -W '02 04 08 10' ) )
1919
return
2020
;;
21-
-E|--file)
21+
--file|-!(-*)E)
2222
_filedir
2323
return
2424
;;

completions/htop

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

88
case "$prev" in
9-
-s|--sort-key)
9+
--sort-key|-!(-*)s)
1010
COMPREPLY=( $( compgen -W '$( "$1" -s help )' -- "$cur" ) )
1111
return
1212
;;
13-
-u|--user)
13+
--user|-!(-*)u)
1414
COMPREPLY=( $( compgen -u -- "$cur" ) )
1515
return
1616
;;
17-
-d|--delay)
17+
--delay|-!(-*)d)
1818
# argument required but no completions available
1919
return
2020
;;

0 commit comments

Comments
 (0)