Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

vcs_info's global variables (was: Re: [RFC][PATCH] `newuser` prompt theme)



Mikael Magnusson wrote on Thu, Apr 15, 2021 at 13:11:16 +0200:
> precmd() {
>   local vcs_info_msg_{0..1}_
>   vcs_info prompt-mikachu
> }
> localing vcs_info_msg_*_ is also important so that you
> don't interfere with any commandline usage of vcs_info.

Good point.  That's not an easy-to-use API design.  Perhaps vcs_info
should start setting $reply and deprecate those global variables?  They
_are_ needed for the PROMPT_SUBST way of using vcs_info, though…

Cheers,

Daniel




Messages sorted by: Reverse Date, Date, Thread, Author