- more make completion fixes from Guillaume Rousse <rousse@ccr.jussieu.fr>

This commit is contained in:
ianmacd 2003-08-05 15:41:40 +00:00
parent f8932a92dd
commit 2297a75343

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b # bash_completion - some programmable completion functions for bash 2.05b
# #
# $Id: bash_completion,v 1.607 2003/08/05 00:32:25 ianmacd Exp $ # $Id: bash_completion,v 1.608 2003/08/05 17:41:40 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -2248,6 +2248,7 @@ _make()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]} prev=${COMP_WORDS[COMP_CWORD-1]}
# --name value style option
case $prev in case $prev in
-@(f|o|W)) -@(f|o|W))
_filedir _filedir
@ -2259,16 +2260,21 @@ _make()
;; ;;
esac esac
case $cur in # --name=value style option
--@(file=|makefile=)) if [[ "$cur" == *=* ]]; then
prev=${cur/=*/}
cur=${cur/*=/}
case "$prev" in
--@(file|makefile))
_filedir _filedir
return 0 return 0
;; ;;
--@(directory=|include-dir=)) --@(directory|include-dir))
_filedir -d _filedir -d
return 0 return 0
;; ;;
esac esac
fi
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\ COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\
@ -2312,7 +2318,7 @@ _make()
fi fi
} }
[ -n "${have:-}" ] && complete -F _make $default $filenames make gmake pmake [ -n "${have:-}" ] && complete -F _make $default make gmake pmake
# GNU tar(1) completion # GNU tar(1) completion
# #