1
# ss(8) completion -*- shell-script -*-
5
local cur prev words cword split
6
_init_completion -s || return
9
-h|--help|-V|--version)
13
COMPREPLY=( $( compgen -W 'unix inet inet6 link netlink' \
18
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
19
COMPREPLY=( $( compgen -P "$prefix" -W '$( "$1" --help | \
20
sed -e "s/|/ /g" -ne "s/.*QUERY := {\([^}]*\)}.*/\1/p" )' \
24
-D|--diag|-F|--filter)
32
if [[ $cur == -* ]]; then
33
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
34
[[ $COMPREPLY == *= ]] && compopt -o nospace
39
# ex: ts=4 sw=4 et filetype=sh