Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates > by-pkgid > 11adddc32af2495acb3ae0d4d57b722d > files > 2

spacecmd-0.5.4-1.fc13.noarch.rpm

_spacecmd()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts=`for i in $(spacecmd help | tail -n +4 | head -n -5 ); do echo $i; done`

        if [[ ${cur} == * ]]; then
            if [[ ${#COMP_WORDS[@]} -gt 2 ]]; then
                return 0
            else
                COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
                return 0
            fi
        fi
}
complete -F _spacecmd spacecmd