Recognize long equivalents to -f and -C when looking for Makefile or dir option.
This commit is contained in:
parent
7e03431ed7
commit
e24fc84c8d
4
CHANGES
4
CHANGES
@ -25,8 +25,8 @@ bash-completion (2.x)
|
|||||||
* Apply cardctl completion to pccardctl too.
|
* Apply cardctl completion to pccardctl too.
|
||||||
* Apply pine completion to alpine too.
|
* Apply pine completion to alpine too.
|
||||||
* Remove many unnecessary short option completions where long ones exist.
|
* Remove many unnecessary short option completions where long ones exist.
|
||||||
* Improve chsh, configure, cvs, gkrellm, gzip, lftp, look, mdadm, modprobe,
|
* Improve chsh, configure, cvs, gkrellm, gzip, lftp, look, make, mdadm,
|
||||||
mplayer, mysqladmin, rsync, screen, service, scp, ssh, sshfs,
|
modprobe, mplayer, mysqladmin, rsync, screen, service, scp, ssh, sshfs,
|
||||||
update-alternatives, vncviewer, yp-tools, and general hostname completions.
|
update-alternatives, vncviewer, yp-tools, and general hostname completions.
|
||||||
* Add abook and wtf completion, based on work by Raphaël Droz.
|
* Add abook and wtf completion, based on work by Raphaël Droz.
|
||||||
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
|
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
|
||||||
|
@ -39,9 +39,9 @@ _make()
|
|||||||
--warn-undefined-variables' -- "$cur" ) )
|
--warn-undefined-variables' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
# before we check for makefiles, see if a path was specified
|
# before we check for makefiles, see if a path was specified
|
||||||
# with -C
|
# with -C/--directory
|
||||||
for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
|
for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
|
||||||
if [[ ${COMP_WORDS[i]} == -C ]]; then
|
if [[ ${COMP_WORDS[i]} == -@(C|-directory) ]]; then
|
||||||
# eval for tilde expansion
|
# eval for tilde expansion
|
||||||
eval makef_dir=${COMP_WORDS[i+1]}
|
eval makef_dir=${COMP_WORDS[i+1]}
|
||||||
break
|
break
|
||||||
@ -49,9 +49,9 @@ _make()
|
|||||||
done
|
done
|
||||||
|
|
||||||
# before we scan for targets, see if a Makefile name was
|
# before we scan for targets, see if a Makefile name was
|
||||||
# specified with -f
|
# specified with -f/--file/--makefile
|
||||||
for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
|
for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
|
||||||
if [[ ${COMP_WORDS[i]} == -f ]]; then
|
if [[ ${COMP_WORDS[i]} == -@(f|-?(make)file) ]]; then
|
||||||
# eval for tilde expansion
|
# eval for tilde expansion
|
||||||
eval makef=${COMP_WORDS[i+1]}
|
eval makef=${COMP_WORDS[i+1]}
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user