]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-bash-completion.sh: file filename completion
authorHarald Hoyer <harald@redhat.com>
Tue, 16 Apr 2013 09:18:18 +0000 (11:18 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Apr 2013 09:32:32 +0000 (11:32 +0200)
dracut-bash-completion.sh

index 322e630b4eb8ef12fbca35699cf72a34b74c0312..ae33b3ec17b2a56432c03f272efd64d58222c3a3 100644 (file)
@@ -44,15 +44,19 @@ _dracut() {
 
         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)
+                                comps=$(compgen -f -- "$cur")
+                                compopt -o filenames
+                        ;;
                         -a|-m|-o|--add|--modules|--omit)
                                 comps=$(dracut --list-modules 2>/dev/null)
                         ;;
                         --kver)
-                                comps=$(cd /lib/modules; echo *)
+                                comps=$(cd /lib/modules; echo [0-9]*)
                         ;;
                         *)
                                 return 0