Browse Source

dracut-bash-completion.sh: file filename completion

master
Harald Hoyer 12 years ago
parent
commit
46a885bf9f
  1. 8
      dracut-bash-completion.sh

8
dracut-bash-completion.sh

@ -44,15 +44,19 @@ _dracut() {


if __contains_word "$prev" ${OPTS[ARG]}; then if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in 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") comps=$(compgen -d -- "$cur")
compopt -o filenames 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) -a|-m|-o|--add|--modules|--omit)
comps=$(dracut --list-modules 2>/dev/null) comps=$(dracut --list-modules 2>/dev/null)
;; ;;
--kver) --kver)
comps=$(cd /lib/modules; echo *) comps=$(cd /lib/modules; echo [0-9]*)
;; ;;
*) *)
return 0 return 0

Loading…
Cancel
Save