summaryrefslogtreecommitdiff
path: root/completions/ss
diff options
context:
space:
mode:
Diffstat (limited to 'completions/ss')
-rw-r--r--completions/ss20
1 files changed, 10 insertions, 10 deletions
diff --git a/completions/ss b/completions/ss
index b240c5e0..05e4e4b2 100644
--- a/completions/ss
+++ b/completions/ss
@@ -6,23 +6,23 @@ _ss()
_init_completion -s || return
case $prev in
- -h|--help|-V|--version)
+ --help|--version|-!(-*)[hV])
return
;;
- -f|--family)
- COMPREPLY=( $( compgen -W 'unix inet inet6 link netlink' \
- -- "$cur" ) )
+ --family|-!(-*)f)
+ COMPREPLY=( $(compgen -W 'unix inet inet6 link netlink' \
+ -- "$cur") )
return
;;
- -A|--query)
+ --query|-!(-*)A)
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $( compgen -W '$( "$1" --help | \
- command sed -e "s/|/ /g" -ne "s/.*QUERY := {\([^}]*\)}.*/\1/p" )' \
- -- "${cur##*,}" ) )
+ COMPREPLY=( $(compgen -W '$("$1" --help | \
+ command sed -e "s/|/ /g" -ne "s/.*QUERY := {\([^}]*\)}.*/\1/p")' \
+ -- "${cur##*,}") )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
- -D|--diag|-F|--filter)
+ --diag|--filter|-!(-*)[DF])
_filedir
return
;;
@@ -31,7 +31,7 @@ _ss()
$split && return
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&