1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

45583/0008: vcs_info git: Use best practices in an example

The alias was vulnerable to SHORT_LOOPS syntax, not invokable from
scripts, etc..
This commit is contained in:
Daniel Shahaf 2021-04-14 15:11:01 +00:00
parent 2144d01102
commit e1f5172a48
2 changed files with 4 additions and 1 deletions

View file

@ -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.

View file

@ -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.