Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
vcs_info's global variables (was: Re: [RFC][PATCH] `newuser` prompt theme)
- X-seq: zsh-workers 48589
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: Marlon <marlon.richert@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: vcs_info's global variables (was: Re: [RFC][PATCH] `newuser` prompt theme)
- Date: Thu, 15 Apr 2021 16:44:24 +0000
- Archived-at: <https://zsh.org/workers/48589>
- In-reply-to: <CAHYJk3SQjaTdiLMQcQFhrkp3rMcX+8gCgJpfT1f=-fPSN2-A9Q@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7am=oS7FEpOOc=vUDLWN3iVQ8--ewqDOJLS2TheDag6TQ@mail.gmail.com> <7E71FA83-356E-448B-9726-02DF3FF5BD14@gmail.com> <CAH+w=7ZBsfiJwC-PYBvOVgrgGmC4RTYt9rRroGiqo_rzVSBJHQ@mail.gmail.com> <873D08A9-F321-474A-8440-CCE7DCCBA529@gmail.com> <20210414120551.GA3882@tarpaulin.shahaf.local2> <6CEA4F3E-9A64-44E1-9121-FA9D5E053AB5@gmail.com> <20210414140909.GG3882@tarpaulin.shahaf.local2> <CAHYJk3SQjaTdiLMQcQFhrkp3rMcX+8gCgJpfT1f=-fPSN2-A9Q@mail.gmail.com>
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