Use compgen -W $cur instead of grepping $cur in make completion.
This commit is contained in:
parent
7c023ab92e
commit
ea2938e424
@ -3037,10 +3037,10 @@ _make()
|
|||||||
[ -n "$makef" ] && makef="-f ${makef}"
|
[ -n "$makef" ] && makef="-f ${makef}"
|
||||||
[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
|
[ -n "$makef_dir" ] && makef_dir="-C ${makef_dir}"
|
||||||
|
|
||||||
COMPREPLY=( $( make -qp $makef $makef_dir 2>/dev/null | \
|
COMPREPLY=( $( compgen -W "$( make -qp $makef $makef_dir 2>/dev/null | \
|
||||||
awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
|
awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
|
||||||
{split($1,A,/ /);for(i in A)print A[i]}' | \
|
{split($1,A,/ /);for(i in A)print A[i]}' )" \
|
||||||
command grep "^$cur" ))
|
-- $cur ) )
|
||||||
|
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user