[Bash-completion-commits] [SCM] bash-completion branch, master, updated. ac644578e07720281452d5ed8c22181365a27d87
Ville Skyttä
ville.skytta at iki.fi
Sun Nov 1 19:03:37 UTC 2009
The following commit has been merged in the master branch:
commit 6394f47a7cbcaf4f044a0a2fc7c8d0cfc43b11e5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Nov 1 20:41:57 2009 +0200
Add basic dir option argument completion for configure.
diff --git a/CHANGES b/CHANGES
index 7401b33..db2b428 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,7 +19,8 @@ bash-completion (2.x)
* Apply cardctl completion to pccardctl too.
* Apply pine completion to alpine too.
* Remove many unnecessary short option completions where long ones exist.
- * Improve cvs, gkrellm, lftp, mdadm, mysqladmin, and ssh completions.
+ * Improve configure, cvs, gkrellm, lftp, mdadm, mysqladmin, and ssh
+ completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
* Add lftpget completion.
* Don't overwrite other host completions when completing from multiple
diff --git a/contrib/configure b/contrib/configure
index 26adeae..308595a 100644
--- a/contrib/configure
+++ b/contrib/configure
@@ -2,10 +2,21 @@
_configure()
{
- local cur
+ local cur prev split=false
COMPREPLY=()
cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _split_longopt && split=true
+
+ case "$prev" in
+ --prefix|--exec-prefix|--*dir)
+ _filedir -d
+ ;;
+ esac
+
+ $split && return 0
# if $COMP_CONFIGURE_HINTS is not null, then completions of the form
# --option=SETTING will include 'SETTING' as a contextual hint
@@ -21,7 +32,7 @@ _configure()
grep ^$cur ) )
fi
}
-complete -F _configure -o default configure
+complete -F _configure -o filenames configure
# Local variables:
# mode: shell-script
--
bash-completion
More information about the Bash-completion-commits
mailing list