summaryrefslogtreecommitdiffstats
path: root/completions/mkinitrd
diff options
context:
space:
mode:
Diffstat (limited to 'completions/mkinitrd')
-rw-r--r--completions/mkinitrd37
1 files changed, 18 insertions, 19 deletions
diff --git a/completions/mkinitrd b/completions/mkinitrd
index bcb7e07..4e11b0b 100644
--- a/completions/mkinitrd
+++ b/completions/mkinitrd
@@ -1,50 +1,49 @@
# bash completion for mkinitrd -*- shell-script -*-
-_mkinitrd()
+_comp_cmd_mkinitrd()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
case $prev in
--preload | --with | --builtin)
- _modules
+ _comp_compgen_kernel_modules
return
;;
--fstab | --dsdt)
- _filedir
+ _comp_compgen_filedir
return
;;
--net-dev)
- _available_interfaces
+ _comp_compgen_available_interfaces
return
;;
esac
- $split && return
+ [[ $was_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"))
+ _comp_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'
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- local args
- _count_args
+ local REPLY
+ _comp_count_args
- case $args in
+ case $REPLY in
1)
- _filedir
+ _comp_compgen_filedir
;;
2)
- _kernel_versions
+ _comp_compgen_kernel_versions
;;
esac
fi
} &&
- complete -F _mkinitrd mkinitrd
+ complete -F _comp_cmd_mkinitrd mkinitrd
# ex: filetype=sh