zsh-vimto icon indicating copy to clipboard operation
zsh-vimto copied to clipboard

RPROMPT won't expand

Open mtahmed opened this issue 5 years ago • 2 comments

This line uses single quotes and the colors don't expand as a result:

RPROMPT=$'%K{$VIMTO_COLOR_NORMAL_BACKGROUND} %F{$VIMTO_COLOR_NORMAL_TEXT}NORMAL%f %k'

I confirmed that the custom colors apply if I change the single quotes to double quotes.

mtahmed avatar Apr 03 '19 21:04 mtahmed

It looks like these are only expanded in the prompt if the PROMPT_SUBST option is enabled, e.g. setopt PROMPT_SUBST.

You're right though. I had not realised this is not enabled by default. A solution that doesn't require that is preferable.

I'm going to make sure there are no side-effects to the change but if not, I'll use your suggestion (PR welcome).

laurenkt avatar Apr 03 '19 21:04 laurenkt

I'll find some time to work on it. Thanks for the super quick response. Cheers!

mtahmed avatar Apr 03 '19 21:04 mtahmed