From 517e1777a52046ac86aca0b8c0b2c7c56d74bf29 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 14 Apr 2021 14:50:34 +0000 Subject: 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. --- ChangeLog | 4 ++++ Doc/Zsh/contrib.yo | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 107900c80..d2b3e19cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2021-04-15 Daniel Shahaf + * 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. diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 07bf4e054..ef992bdeb 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -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 -- cgit 1.4.1