Add basic dir option argument completion for configure.
This commit is contained in:
parent
988026a67e
commit
6394f47a7c
3
CHANGES
3
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
|
||||
|
15
contrib/configure
vendored
15
contrib/configure
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user