make: Add generic variable completion.
This commit is contained in:
parent
ccda61d928
commit
f7240b82a4
@ -37,6 +37,12 @@ _make()
|
|||||||
[[ $opts ]] || opts="$( _parse_usage "$1" )"
|
[[ $opts ]] || opts="$( _parse_usage "$1" )"
|
||||||
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||||
|
elif [[ $cur == *=* ]]; then
|
||||||
|
prev=${cur%%=*}
|
||||||
|
cur=${cur#*=}
|
||||||
|
local diropt
|
||||||
|
[[ ${prev,,} == *dir?(ectory) ]] && diropt=-d
|
||||||
|
_filedir $diropt
|
||||||
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/--directory
|
# with -C/--directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user