The following
code:
psvar=( $'%{\e[2m%}' $'%{\e[0m%}' )
PS1='%1v%#%2v '
results in
t
he following prompt with terminal default color:
%{^[[2m%}%%{^[[0m%}
As you can see, the strings stored in $psvar are expanded in a quoted form, à la bindkey.
Is this intentional? If so, why? Is there a way to circumvent this?