1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00

27429: _make: restore variable value completion

make indentation more standard
This commit is contained in:
Peter Stephenson 2009-11-24 10:14:33 +00:00
parent b97284cde2
commit 85842387f8
2 changed files with 174 additions and 171 deletions

View file

@ -1,5 +1,8 @@
2009-11-24 Peter Stephenson <pws@csr.com> 2009-11-24 Peter Stephenson <pws@csr.com>
* 27429: Completion/Unix/Command/_make: restore variable value
completion. Also make indentation more standard (not posted).
* Michael Hwang <michael.a.hwang@gmail.com>: 27428: * Michael Hwang <michael.a.hwang@gmail.com>: 27428:
Completion/Unix/Command/_make: complete rewrite with Completion/Unix/Command/_make: complete rewrite with
variable completion. variable completion.
@ -12387,5 +12390,5 @@
***************************************************** *****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL * This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4821 $ * $Revision: 1.4822 $
***************************************************** *****************************************************

View file

@ -50,7 +50,9 @@ expandVars() {
ret=${ret//\$$open$var$close/$val} ret=${ret//\$$open$var$close/$val}
;; ;;
(*) # Improper variable name. No replacement. I'm not sure if this is desired behavior. (*)
# Improper variable name. No replacement.
# I'm not sure if this is desired behavior.
front+="\$$open$var$close" front+="\$$open$var$close"
ret=${ret/\$$open$var$close/} ret=${ret/\$$open$var$close/}
;; ;;
@ -197,7 +199,10 @@ else
if [[ $PREFIX == (#b)([^=]##)'='* ]] && [[ -n ${${(k)VARIABLES}[(r)${match[1]}]} ]] if [[ $PREFIX == (#b)([^=]##)'='* ]] && [[ -n ${${(k)VARIABLES}[(r)${match[1]}]} ]]
then then
_message 'override make variable' # Complete make variable as if shell variable
compstate[parameter]="${PREFIX%%\=*}"
compset -P 1 '*='
_value "$@"
else else
_tags targets variables _tags targets variables
while _tags while _tags
@ -208,9 +213,4 @@ else
compadd -S '=' -- ${(k)VARIABLES} compadd -S '=' -- ${(k)VARIABLES}
done done
fi fi
# These are left over from the old completion. I'm not sure what they do.
#compstate[parameter]="${PREFIX%%\=*}"
#compset -P 1 '*='
#_value "$@"
fi fi