|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/zsh/4.2.6/functions/ |
Upload File : |
#compdef -vared-
local also
# Completion inside vared.
if [[ $compstate[vared] = *\[* ]]; then
if [[ $compstate[vared] = *\]* ]]; then
# vared on an array-element
compstate[parameter]=${${compstate[vared]%%\]*}//\[/-}
compstate[context]=value
also=-value-
else
# vared on an array-value
compstate[parameter]=${compstate[vared]%%\[*}
compstate[context]=value
also=-value-
fi
else
# vared on a parameter, let's see if it is an array
compstate[parameter]=$compstate[vared]
if [[ ${(tP)compstate[vared]} = *(array|assoc)* ]]; then
compstate[context]=array_value
also=-array-value-
else
compstate[context]=value
also=-value-
fi
fi
# Don't insert TAB in first column. Never.
compstate[insert]="${compstate[insert]//tab /}"
_dispatch "$also" "$also"