PageRenderTime 102ms CodeModel.GetById 100ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/bash_completion.d/chsh

http://github.com/brinkman83/bashrc
#! | 27 lines | 22 code | 5 blank | 0 comment | 0 complexity | d6a9a470197f5765f95380553de755ef MD5 | raw file
 1# chsh(1) completion
 2
 3_chsh()
 4{
 5    local cur prev
 6
 7    COMPREPLY=()
 8    cur=`_get_cword`
 9    prev=${COMP_WORDS[COMP_CWORD-1]}
10
11    if [ "$prev" = "-s" ]; then
12        _shells
13    else
14        COMPREPLY=( $( compgen -u -- "$cur" ) )
15    fi
16
17    return 0
18}
19complete -F _chsh chsh
20
21# Local variables:
22# mode: shell-script
23# sh-basic-offset: 4
24# sh-indent-comment: t
25# indent-tabs-mode: nil
26# End:
27# ex: ts=4 sw=4 et filetype=sh