go env can show values of individual environment variables
This commit is contained in:
parent
17239cec96
commit
0a0894d07c
|
@ -196,18 +196,19 @@ case $state in
|
|||
_arguments \
|
||||
'-json[print the environment in JSON format]' \
|
||||
'-u[unset environment variables]' \
|
||||
'-w[change the default setting of environment variables]'
|
||||
'-w[change the default setting of environment variables]' \
|
||||
'*:[show environment variable]:_values ${goenvvars%=}'
|
||||
else
|
||||
case $words[2] in
|
||||
-u)
|
||||
_values -s ' ' -w 'environment variable' ${goenvvars%=}
|
||||
;;
|
||||
-w)
|
||||
if compset -P '*='; then
|
||||
else
|
||||
_values -S "=" 'environment variable' $goenvvars
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
_values -s ' ' -w 'environment variable' ${goenvvars%=}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue