[Bash-completion-commits] [SCM] bash-completion branch, master, updated. cb6a9a4dfedf7f9a45ae9f6c010b73aae2d33323
Ville Skyttä
ville.skytta at iki.fi
Thu Oct 7 17:40:34 UTC 2010
The following commit has been merged in the master branch:
commit 96b1594e4ef76b48491bb5d6d0f14720fec36c5a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Oct 7 20:37:06 2010 +0300
Use "compopt -o filenames" if available instead of "compgen -f" hack in _cd().
diff --git a/bash_completion b/bash_completion
index af10c39..5c6c850 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1370,8 +1370,10 @@ _cd()
return 0
fi
- # Enable -o filenames option, see Debian bug #272660
- compgen -f /non-existing-dir/ >/dev/null
+ # Turn on -o filenames; see http://bugs.debian.org/272660#64 for
+ # info about the compgen hack (bash < 4)
+ compopt -o filenames 2>/dev/null || \
+ compgen -f /non-existing-dir/ >/dev/null
# Use standard dir completion if no CDPATH or parameter starts with /,
# ./ or ../
--
bash-completion
More information about the Bash-completion-commits
mailing list