[Bash-completion-commits] [SCM] bash-completion branch, master, updated. c953606fd283b6ce3311cd046fa8cbcdc711c78f
Guillaume Rousse
guillomovitch at zarb.org
Tue Apr 6 19:30:17 UTC 2010
The following commit has been merged in the master branch:
commit c953606fd283b6ce3311cd046fa8cbcdc711c78f
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date: Tue Apr 6 21:30:07 2010 +0200
extend previous fix for directory completion too
diff --git a/bash_completion b/bash_completion
index 8626fd2..3da1f36 100644
--- a/bash_completion
+++ b/bash_completion
@@ -570,13 +570,23 @@ _filedir()
# bash-3.1. See also:
# http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html
_quote_readline_by_ref "$cur" quoted
- toks=( ${toks[@]-} $(
- compgen -d -- "$quoted" | {
- while read -r tmp; do
- printf '%s\n' $tmp
- done
- }
- ))
+ if [[ ${quoted:0:1} == '$' ]]; then
+ toks=( ${toks[@]-} $(
+ eval compgen -d -- "$quoted" | {
+ while read -r tmp; do
+ printf '%s\n' $tmp
+ done
+ }
+ ))
+ else
+ toks=( ${toks[@]-} $(
+ compgen -d -- "$quoted" | {
+ while read -r tmp; do
+ printf '%s\n' $tmp
+ done
+ }
+ ))
+ fi
# On bash-3, special characters need to be escaped extra. This is
# unless the first character is a single quote ('). If the single
--
bash-completion
More information about the Bash-completion-commits
mailing list