mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-31 03:04:49 +01:00
13482: Frank Terbeck: fix some prompt docs for vcs info
This commit is contained in:
parent
6636282a16
commit
21e1b38ffb
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-11-24 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Frank Terbeck: users/13482: Doc/Zsh/contrib.yo: fix some prompt
|
||||
docs for vcs info.
|
||||
|
||||
2008-11-23 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* users/13477: Completion/Unix/Command/_rm: call _files instead
|
||||
|
|
|
@ -362,12 +362,15 @@ zstyle ':vcs_info:*' formats \
|
|||
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
|
||||
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||
precmd () { vcs_info }
|
||||
PS1='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}'"%f%# ')
|
||||
PS1='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}%f%# ')
|
||||
|
||||
Obviously, the last two lines are there for demonstration: You need to
|
||||
call var(vcs_info) from your var(precmd) function. Once that is done you need
|
||||
a tt(single quoted) var('${vcs_info_msg_0_}') in your prompt.
|
||||
|
||||
To be able to use var('${vcs_info_msg_0_}') directly in your prompt like
|
||||
this, you will need to have the tt(PROMPT_SUBST) option enabled.
|
||||
|
||||
Now call the tt(vcs_info_printsys) utility from the command line:
|
||||
|
||||
example(% vcs_info_printsys
|
||||
|
|
Loading…
Reference in a new issue