[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 66d3b639159492dcee0845a915724bdf90c96d45
Freddy Vulto
fvulto at gmail.com
Wed Jun 30 21:40:35 UTC 2010
The following commit has been merged in the master branch:
commit 66d3b639159492dcee0845a915724bdf90c96d45
Author: Freddy Vulto <fvulto at gmail.com>
Date: Wed Jun 30 23:40:13 2010 +0200
Speed up `compopt' availability detection.
Used `type compopt' instead of `compopt' to detect availability of
compopt because (at least on Ubuntu) a python-command-not-found handler
is started when issuing a non-existing command, thus resulting in
considerable slower completions on systems without compopt (bash < 4.0).
diff --git a/CHANGES b/CHANGES
index 1c311bc..e1ba72b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,7 @@ bash-completion (2.x)
[ Freddy Vulto ]
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
+ * Speed up `compopt' availability detection
-- David Paleino <d.paleino at gmail.com> Wed, 16 Jun 2010 17:53:22 +0200
diff --git a/bash_completion b/bash_completion
index e1e926b..732cb9a 100644
--- a/bash_completion
+++ b/bash_completion
@@ -642,7 +642,7 @@ _filedir()
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
if [ ${#toks[@]} -ne 0 ]; then
# If `compopt' is available, set `-o filenames'
- compopt &>/dev/null && compopt -o filenames ||
+ type compopt &>/dev/null && compopt -o filenames ||
# No, `compopt' isn't available;
# Is `-o filenames' set?
[[ (
--
bash-completion
More information about the Bash-completion-commits
mailing list