]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - dracut-bash-completion.sh
iscsi: always popd, even if there is no iscsi device
[thirdparty/dracut.git] / dracut-bash-completion.sh
index 38e2ebd935bfac220d79d92e8e8ba66aec065872..17374bf3e0f40f057e19a3bed745374d98221b40 100644 (file)
@@ -1,6 +1,3 @@
-#!/bin/bash
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
 #
 # Copyright 2013 Red Hat, Inc.  All rights reserved.
 #
@@ -32,25 +29,38 @@ _dracut() {
                               --hardlink --nohardlink --noprefix --mdadmconf --nomdadmconf
                               --lvmconf --nolvmconf --debug --profile --verbose --quiet
                               --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
-                              --xz --no-compress --gzip --list-modules --show-modules --keep
-                              --printsize --regenerate-all --noimageifnotneeded'
+                              --xz --zstd --no-compress --gzip --list-modules --show-modules --keep
+                              --printsize --regenerate-all --noimageifnotneeded --early-microcode
+                              --no-early-microcode --print-cmdline --reproducible --uefi'
 
                        [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
                               --omit-drivers --modules --omit --drivers --filesystems --install
                               --fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
                               --kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
-                              --kernel-cmdline --sshkey'
+                              --kernel-cmdline --sshkey --persistent-policy --install-optional
+                              --loginstall --uefi-stub --kernel-image
+                              '
         )
 
         if __contains_word "$prev" ${OPTS[ARG]}; then
                 case $prev in
-                        --kmoddir|-k|--fwdir|-c|--conf|--confdir|--tmpdir|--sshkey|--add-fstab|--add-device|-I|--install)
+                        --kmoddir|-k|--fwdir|--confdir|--tmpdir)
                                 comps=$(compgen -d -- "$cur")
                                 compopt -o filenames
                         ;;
+                        -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional)
+                                comps=$(compgen -f -- "$cur")
+                                compopt -o filenames
+                        ;;
                         -a|-m|-o|--add|--modules|--omit)
                                 comps=$(dracut --list-modules 2>/dev/null)
                         ;;
+                        --persistent-policy)
+                                comps=$(cd /dev/disk/; echo *)
+                        ;;
+                        --kver)
+                                comps=$(cd /lib/modules; echo [0-9]*)
+                        ;;
                         *)
                                 return 0
                         ;;