The following commit has been merged in the master branch:
commit 00560a88b4b4fdd99c8427da60c2b6039a30c8ad
Author: David Paleino <[email protected]>
Date: Tue Feb 9 10:59:47 2010 +0100
_filedir: bash > 4 has the same behaviour regardless of $cur beginning with
' or not
This can be triggered when $cur is actually empty, like, for example,
when _filedir
is manually launched from the command line:
$ _filedir in
$ echo ${comprep...@]}
test doc .git contrib
i.e. it's only showing the directories, not showing the files we're
looking for.
After this commit:
$ . bash_completion
$ _filedir in
$ echo ${comprep...@]}
test doc .git contrib bash_completion.sh.in Makefile.in
$
Which is the expected behaviour.
diff --git a/bash_completion b/bash_completion
index 84f9bd0..98f5214 100644
--- a/bash_completion
+++ b/bash_completion
@@ -588,7 +588,7 @@ _filedir()
#
if [[ "$1" != -d ]]; then
xspec=${1:+"!*.$1"}
- if [[ ${cur:0:1} == "'" && ${BASH_VERSINFO[0]} -ge 4 ]]; then
+ if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
toks=( ${to...@]-} $(
eval compgen -f -X \"\$xspec\" -- $quoted
) )
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits