1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-12 22:10:54 +01:00

45583/0006: vcs_info docs: Change user-context name in an example, to avoid confusion with the special-casing of the value `command' in vcs_info_lastmsg.

This commit is contained in:
Daniel Shahaf 2021-04-14 14:50:34 +00:00
parent ebcb20a9c0
commit 517e1777a5
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2021-04-15 Daniel Shahaf <d.s@daniel.shahaf.name>
* 45583/0006: Doc/Zsh/contrib.yo: vcs_info docs: Change
user-context name in an example, to avoid confusion with the
special-casing of the value `command' in vcs_info_lastmsg.
* 45583/0005: Doc/Zsh/contrib.yo: vcs_info docs: Recommend use
of prompt expandos rather than terminal escape sequences.

View file

@ -1845,10 +1845,10 @@ Make sure you enclose the color codes in tt(%{)var(...)tt(%})
if you want to use the string provided by tt(vcs_info) in prompts.
Here is how to print the VCS information as a command (not in a prompt):
example(alias vcsi='vcs_info command; vcs_info_lastmsg')
example(alias vcsi='vcs_info interactive; vcs_info_lastmsg')
This way, you can even define different formats for output via
tt(vcs_info_lastmsg) in the 'tt(:vcs_info:*:command:*)' namespace.
tt(vcs_info_lastmsg) in the 'tt(:vcs_info:*:interactive:*)' namespace.
Now as promised, some code that uses hooks:
say, you'd like to replace the string `svn' by `subversion' in