PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion.d/unace

http://github.com/brinkman83/bashrc
#! | 36 lines | 30 code | 6 blank | 0 comment | 0 complexity | c9b05342757eabb6a6dfdcb8f5de3bc7 MD5 | raw file
 1# unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
 2
 3have unace &&
 4_unace()
 5{
 6    local cur
 7
 8    COMPREPLY=()
 9    cur=`_get_cword`
10
11    case "$cur" in
12        -*)
13            COMPREPLY=( $( compgen -W '-c -c- -f -f- -o -o- -p -y -y-' \
14                -- "$cur" ) )
15            ;;
16        *)
17        if [ $COMP_CWORD -eq 1 ]; then
18            COMPREPLY=( $( compgen -W 'e l t v x' -- "$cur" ) )
19        else
20            _filedir '@(ace|ACE)'
21        fi
22        ;;
23    esac
24
25    return 0
26
27} &&
28complete -F _unace $filenames unace
29
30# Local variables:
31# mode: shell-script
32# sh-basic-offset: 4
33# sh-indent-comment: t
34# indent-tabs-mode: nil
35# End:
36# ex: ts=4 sw=4 et filetype=sh