39 lines
935 B
Plaintext
Raw Normal View History

2009-09-14 21:32:06 +02:00
# bash completion for ipmitool
have ipmitool &&
_ipmitool()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-09-14 21:32:06 +02:00
2009-10-04 19:42:50 +02:00
COMPREPLY=()
_get_comp_words_by_ref cur prev
2009-09-14 21:32:06 +02:00
case $prev in
2009-10-04 19:42:50 +02:00
-I)
COMPREPLY=( $( compgen -W 'open imb lan lanplus free' -- "$cur" ) )
return 0
;;
esac
2009-09-14 21:32:06 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h -V -v -c -d -I -H -p -U -f -S -a \
-e -C -k -y -K -A -P -E -K -m -b -r -B -T -l -o -O' -- "$cur" ) )
else
COMPREPLY=( $( compgen -W 'raw i2c spd lan chassis power event \
mc sdr sensor fru gendev sel pef sol tsol isol user \
channel session sunoem kontronoem picmg fwum firewall \
exec set hpm ekanalyzer' -- "$cur" ) )
fi
2009-09-14 21:32:06 +02:00
} &&
complete -F _ipmitool ipmitool
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh