mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-01-09 20:33:34 -08:00
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
# bash completion for mkinitrd -*- shell-script -*-
|
|
|
|
_mkinitrd()
|
|
{
|
|
local cur prev words cword split
|
|
_init_completion -s || return
|
|
|
|
case $prev in
|
|
--preload | --with | --builtin)
|
|
_modules
|
|
return
|
|
;;
|
|
--fstab | --dsdt)
|
|
_filedir
|
|
return
|
|
;;
|
|
--net-dev)
|
|
_available_interfaces
|
|
return
|
|
;;
|
|
esac
|
|
|
|
$split && return
|
|
|
|
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 \
|
|
--omit-raid-modules --with= --force-lvm-probe \
|
|
--omit-lvm-modules --builtin --omit-dmraid --net-dev \
|
|
--fstab --nocompress --dsdt --bootchart' -- "$cur"))
|
|
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
|
|
else
|
|
local args
|
|
_count_args
|
|
|
|
case $args in
|
|
1)
|
|
_filedir
|
|
;;
|
|
2)
|
|
_kernel_versions
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
} &&
|
|
complete -F _mkinitrd mkinitrd
|
|
|
|
# ex: filetype=sh
|