~jjo/bash-completion/fix-bash43-quote_readline_by_ref-tilde-and-double_escaping

« back to all changes in this revision

Viewing changes to completions/ss

  • Committer: Package Import Robot
  • Author(s): Dimitri John Ledkov
  • Date: 2013-12-27 01:28:28 UTC
  • mfrom: (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20131227012828-svk9wdy2ghic0cfh
Tags: 1:2.1-2ubuntu1
* Resync with Debian, remaining diff
  * debian/patches/disable-avahi-browse.diff: Disable avahi-browse since
    it scales poorly in the current form: refresh patch
  * mark Multi-Arch:foreign
  * debian/maintscript, debian/postinst:
    - clean etc conffiles on upgrade since completion files are in /usr
      with the new version
  * patches/101_bash_completion.oga_ogv.patch: Increase support for other
    OGG formats including .oga, .ogx, etc. (LP: #311525)

* Dropped changes:
  - patches/103_colormake.patch: Add support for colormake to the make
    completion rules. (LP: #743208)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ss(8) completion                                         -*- shell-script -*-
 
2
 
 
3
_ss()
 
4
{
 
5
    local cur prev words cword split
 
6
    _init_completion -s || return
 
7
 
 
8
    case $prev in
 
9
        -h|--help|-V|--version)
 
10
            return
 
11
            ;;
 
12
        -f|--family)
 
13
            COMPREPLY=( $( compgen -W 'unix inet inet6 link netlink' \
 
14
                -- "$cur" ) )
 
15
            return
 
16
            ;;
 
17
        -A|--query)
 
18
            local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
 
19
            COMPREPLY=( $( compgen -P "$prefix" -W '$( "$1" --help | \
 
20
                sed -e "s/|/ /g" -ne "s/.*QUERY := {\([^}]*\)}.*/\1/p"  )' \
 
21
                -- "${cur##*,}" ) )
 
22
            return
 
23
            ;;
 
24
        -D|--diag|-F|--filter)
 
25
            _filedir
 
26
            return
 
27
            ;;
 
28
    esac
 
29
 
 
30
    $split && return
 
31
 
 
32
    if [[ $cur == -* ]]; then
 
33
        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
 
34
        [[ $COMPREPLY == *= ]] && compopt -o nospace
 
35
    fi
 
36
} &&
 
37
complete -F _ss ss
 
38
 
 
39
# ex: ts=4 sw=4 et filetype=sh