From 2297a7534397f8c5858e60760e6df59a8ef4f4c0 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Tue, 5 Aug 2003 15:41:40 +0000 Subject: [PATCH] - more make completion fixes from Guillaume Rousse --- bash_completion | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/bash_completion b/bash_completion index e372ff14..c7ef440b 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # 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 # @@ -2248,6 +2248,7 @@ _make() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} + # --name value style option case $prev in -@(f|o|W)) _filedir @@ -2259,16 +2260,21 @@ _make() ;; esac - case $cur in - --@(file=|makefile=)) - _filedir - return 0 - ;; - --@(directory=|include-dir=)) - _filedir -d - return 0 - ;; - esac + # --name=value style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(file|makefile)) + _filedir + return 0 + ;; + --@(directory|include-dir)) + _filedir -d + return 0 + ;; + esac + fi if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\ @@ -2312,7 +2318,7 @@ _make() fi } -[ -n "${have:-}" ] && complete -F _make $default $filenames make gmake pmake +[ -n "${have:-}" ] && complete -F _make $default make gmake pmake # GNU tar(1) completion #