about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-14 15:11:01 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-15 16:27:53 +0000
commite1f5172a4831087399945e9cc38666be78e667ab (patch)
treea2c4dc2b8660ac2fed2cc564e01338a317cf43b0
parent2144d0110282e5ab755e2ec159b8604208e671d5 (diff)
downloadzsh-e1f5172a4831087399945e9cc38666be78e667ab.tar.gz
zsh-e1f5172a4831087399945e9cc38666be78e667ab.tar.xz
zsh-e1f5172a4831087399945e9cc38666be78e667ab.zip
45583/0008: vcs_info git: Use best practices in an example
The alias was vulnerable to SHORT_LOOPS syntax, not invokable from
scripts, etc..
-rw-r--r--ChangeLog3
-rw-r--r--Doc/Zsh/contrib.yo2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 626016c0d..6494e0018 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2021-04-15  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 45583/0008: Doc/Zsh/contrib.yo: vcs_info git: Use best
+	practices in an example
+
 	* 45583/0007: Doc/Zsh/contrib.yo: vcs_info docs:
 	vcs_info_lastmsg: Correct an ambiguous/wrong description.
 
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 5fe5601a7..3c4fdded0 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1845,7 +1845,7 @@ 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 interactive; vcs_info_lastmsg')
+example(vcsi+LPAR()+RPAR() { 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:*:interactive:*)' namespace.