[Bash-completion-commits] [SCM] bash-completion branch, master, updated. b556b22d8717e8c9d547f07aebc8c902ea22af3f
Ville Skyttä
ville.skytta at iki.fi
Tue Apr 14 21:09:52 UTC 2009
The following commit has been merged in the master branch:
commit b556b22d8717e8c9d547f07aebc8c902ea22af3f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Apr 15 00:09:33 2009 +0300
Do not assume all --foo= options take filenames in generic long option completion, assume only that --*file*= does, and that --*dir*= takes dirs.
diff --git a/CHANGES b/CHANGES
index e7fd563..b856e17 100644
--- a/CHANGES
+++ b/CHANGES
@@ -38,6 +38,8 @@ bash-completion (1.x)
generic long option completion.
* Add chown --from and --reference value completions.
* Add chgrp --reference value completion.
+ * Do not assume all --foo= options take filenames in generic long option
+ completion, assume only that --*file*= does, and that --*dir*= takes dirs.
[ Todd Zullinger ]
* Make yum complete on filenames after install, deplist, update and upgrade
diff --git a/bash_completion b/bash_completion
index d331868..2bd7114 100644
--- a/bash_completion
+++ b/bash_completion
@@ -4300,7 +4300,14 @@ _longopt()
prev=${COMP_WORDS[COMP_CWORD-1]}
if _split_longopt; then
- _filedir
+ case "$prev" in
+ *[Dd][Ii][Rr]*)
+ _filedir -d
+ ;;
+ *[Ff][Ii][Ll][Ee]*)
+ _filedir
+ ;;
+ esac
return 0
fi
--
bash-completion
More information about the Bash-completion-commits
mailing list