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

/bash_completion.d/ipmitool

http://github.com/brinkman83/bashrc
#! | 39 lines | 32 code | 7 blank | 0 comment | 0 complexity | bd52e5b35d2679b3a85cf4a9d22552d7 MD5 | raw file
 1# bash completion for ipmitool
 2
 3have ipmitool &&
 4_ipmitool()
 5{
 6    local cur prev
 7
 8    COMPREPLY=()
 9    cur=`_get_cword`
10    prev=${COMP_WORDS[COMP_CWORD-1]}
11
12    case "$prev" in
13        -I)
14            COMPREPLY=( $( compgen -W 'open imb lan lanplus free' -- "$cur" ) )
15            return 0
16            ;;
17    esac
18
19
20    if [[ "$cur" == -* ]]; then
21        COMPREPLY=( $( compgen -W '-h -V -v -c -d -I -H -p -U -f -S -a \
22            -e -C -k -y -K -A -P -E -K -m -b -r -B -T -l -o -O' -- "$cur" ) )
23    else
24        COMPREPLY=( $( compgen -W 'raw i2c spd lan chassis power event \
25            mc sdr sensor fru gendev sel pef sol tsol isol user \
26            channel session sunoem kontronoem picmg fwum firewall \
27            exec set hpm ekanalyzer' -- "$cur" ) )
28    fi
29
30} &&
31complete -F _ipmitool ipmitool
32
33# Local variables:
34# mode: shell-script
35# sh-basic-offset: 4
36# sh-indent-comment: t
37# indent-tabs-mode: nil
38# End:
39# ex: ts=4 sw=4 et filetype=sh