PageRenderTime 37ms CodeModel.GetById 35ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion.d/cksfv

http://github.com/brinkman83/bashrc
#! | 36 lines | 31 code | 5 blank | 0 comment | 0 complexity | 0d292d5395a999a419ce091aaee14457 MD5 | raw file
 1# cksfv completion by Chris <xris@forevermore.net>
 2
 3have cksfv &&
 4_cksfv()
 5{
 6    COMPREPLY=()
 7    cur=`_get_cword`
 8
 9    if [ $COMP_CWORD -eq 1 ]; then
10        COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- "$cur" ) )
11        return 0
12    fi
13
14    case "${COMP_WORDS[$COMP_CWORD-1]}" in
15    -C)
16        _filedir -d
17        return 0
18        ;;
19    -f)
20        _filedir 'sfv'
21        return 0
22        ;;
23    esac
24
25    _filedir
26    return 0
27} &&
28complete -F _cksfv cksfv
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