1 2 3 4 5 6 7
#compdef -subscript- if [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then compgen -S ']' -k "( ${(kP)${compstate[parameter]}} )" else _compalso -math- fi