2011-11-01 22:14:45 +02:00
|
|
|
# bash completion for mkinitrd -*- shell-script -*-
|
2009-01-19 21:31:54 +01:00
|
|
|
|
|
|
|
_mkinitrd()
|
|
|
|
{
|
2011-05-01 22:18:40 +03:00
|
|
|
local cur prev words cword split
|
|
|
|
_init_completion -s || return
|
2009-10-04 19:42:50 +02:00
|
|
|
|
2009-12-30 00:39:59 +01:00
|
|
|
case $prev in
|
2009-11-22 11:43:26 +01:00
|
|
|
--preload|--with|--builtin)
|
2009-10-04 19:42:50 +02:00
|
|
|
_modules
|
|
|
|
return 0
|
|
|
|
;;
|
2009-11-22 11:43:26 +01:00
|
|
|
--fstab|--dsdt)
|
2009-10-04 19:42:50 +02:00
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--net-dev)
|
|
|
|
_available_interfaces
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
$split && return 0
|
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--version --help -v -f --preload \
|
|
|
|
--force-scsi-probe --omit-scsi-modules \
|
|
|
|
--omit-ide-modules --image-version --force-raid-probe \
|
2011-05-02 11:41:52 +03:00
|
|
|
--omit-raid-modules --with= --force-lvm-probe \
|
2009-10-04 19:42:50 +02:00
|
|
|
--omit-lvm-modules --builtin --omit-dmraid --net-dev \
|
|
|
|
--fstab --nocompress --dsdt --bootchart' -- "$cur" ) )
|
2011-05-02 11:41:52 +03:00
|
|
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
2009-10-04 19:42:50 +02:00
|
|
|
else
|
2011-04-20 22:42:55 +03:00
|
|
|
local args
|
2009-10-04 19:42:50 +02:00
|
|
|
_count_args
|
|
|
|
|
|
|
|
case $args in
|
|
|
|
1)
|
|
|
|
_filedir
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
_kernel_versions
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2009-01-19 21:31:54 +01:00
|
|
|
|
|
|
|
} &&
|
|
|
|
complete -F _mkinitrd mkinitrd
|
2009-10-01 20:54:51 +03:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|