zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: (0/2) More vcs_info changes
@ 2010-05-14  7:40 Frank Terbeck
  2010-05-14  7:40 ` PATCH: (1/2) vcs_info: more minor documentation fixes Frank Terbeck
  2010-05-14  7:40 ` PATCH: (2/2) vcs_info: change default formats Frank Terbeck
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Terbeck @ 2010-05-14  7:40 UTC (permalink / raw)
  To: zsh-workers

Here are two more patches from Simon on top of the big one, which was
applied a few days ago. The "change default formats" patch does not
change vcs_info's default behaviour even if it may sound like it would.

Simon Ruderich (2):
  vcs_info: more minor documentation fixes
  vcs_info: change default formats

 Doc/Zsh/contrib.yo                  |    8 ++++----
 Functions/VCS_Info/VCS_INFO_formats |    4 ++--
 Misc/vcs_info-examples              |   18 +++++-------------
 3 files changed, 11 insertions(+), 19 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: (1/2) vcs_info: more minor documentation fixes
  2010-05-14  7:40 PATCH: (0/2) More vcs_info changes Frank Terbeck
@ 2010-05-14  7:40 ` Frank Terbeck
  2010-05-14  7:40 ` PATCH: (2/2) vcs_info: change default formats Frank Terbeck
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Terbeck @ 2010-05-14  7:40 UTC (permalink / raw)
  To: zsh-workers; +Cc: Simon Ruderich

From: Simon Ruderich <simon@ruderich.org>

---
 Doc/Zsh/contrib.yo     |    4 ++--
 Misc/vcs_info-examples |   12 +++++-------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 10a45e8..2708625 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -360,9 +360,9 @@ subsect(Quickstart)
 To get this feature working quickly (including colors), you can do the
 following (assuming, you loaded var(vcs_info) properly - see above):
 
-example(zstyle ':vcs_info:*' actionformats \ 
+example(zstyle ':vcs_info:*' actionformats \
     '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
-zstyle ':vcs_info:*' formats       \ 
+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 }
diff --git a/Misc/vcs_info-examples b/Misc/vcs_info-examples
index 6060f23..e0f531b 100644
--- a/Misc/vcs_info-examples
+++ b/Misc/vcs_info-examples
@@ -2,7 +2,7 @@
 
 ### Running vcs_info #########################################################
 
-# As always, there's more than one way to skin a cat. Running vcs_info is
+# As always, there's more than one way to skin a cat. Running vcs_info is no
 # exception. Here is a rundown of three common ways to get it into action.
 #
 # All three ways need vcs_info to be marked for autoloading first, so you'd
@@ -140,7 +140,6 @@ zstyle ':vcs_info:hg:*' branchformat '%b'
 # Then add the hash to 'formats' as %i and truncate it to 12 chars:
 zstyle ':vcs_info:hg:*' formats ' (%s)-[%12.12i %b]-'
 
-
 ### Truncate long hash to 12-chars but also allow for multiple parents
 # Hashes are joined with a + to mirror the output of `hg id`.
 zstyle ':vcs_info:hg+set-hgrev-format:*' hooks hg-shorthash
@@ -162,7 +161,7 @@ function +vi-hg-shorthash() {
 zstyle ':vcs_info:hg+set-hgrev-format:*' hooks hg-storerev
 zstyle ':vcs_info:hg+set-message:*' hooks hg-branchhead
 
-# The hash is availabe in the hgrev-format hook, store a copy of it in the
+# The hash is available in the hgrev-format hook, store a copy of it in the
 # user_data array so we can access it in the second function
 function +vi-hg-storerev() {
     user_data[hash]=${hook_com[hash]}
@@ -189,7 +188,7 @@ function +vi-hg-branchhead() {
 }
 
 
-### Run vcs_info selectively to increase speed in large repos #################
+### Run vcs_info selectively to increase speed in large repos ################
 
 # The following example shows a possible setup for vcs_info which displays
 # staged and unstaged changes in the vcs_info prompt and prevents running
@@ -306,7 +305,7 @@ zstyle ':vcs_info:*' actionformats " (%s)-[%b%Q|%a]-"
 # or apply patches to a normal directory tree that's not under version
 # control. The debian project does this for a large number of packages,
 # during their automatic build process.
-# The `use-quilt' style only enables# addon-mode, because for standalone
+# The `use-quilt' style only enables addon-mode, because for standalone
 # mode we'd have to try to detect whether quilt is "active" in a directory.
 # You can fine-tune that "detection" using the `quilt-standalone' style.
 # If the value of that style is a function name, that function is executed
@@ -361,7 +360,7 @@ zstyle ':vcs_info:*' quiltformat '#%p [%n|%c]'
 # quilt-nopatch-format (default: "no patch applied")
 zstyle ':vcs_info:*' quilt-nopatch-format '#cleeaaaaan!1!!'
 
-# To retrieve inforamation about unapplied patches, vcs_info invokes `quilt'
+# To retrieve information about unapplied patches, vcs_info invokes `quilt'
 # itself. Even though that's pretty quick, it's not needed for the default
 # behaviour. If we want to have `%c' and `%u' to contain meaningful data,
 # we have to enable retrieval of unapplied data:
@@ -379,7 +378,6 @@ zstyle ':vcs_info:-quilt-.quilt-standalone:*:*' quilt-patch-dir debian/patches
 # want the default `patches' though but a dedicated place for them.
 # Say `~/patches/<repository-name>'. Now we'll use some evaluated-style
 # magic to achieve all that:
-
 zstyle -e ':vcs_info:*.quilt-addon:*:*' quilt-patch-dir 'my-patches-func'
 
 # That runs something called `my-patches-func', and the value of $reply is
-- 
1.7.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: (2/2) vcs_info: change default formats
  2010-05-14  7:40 PATCH: (0/2) More vcs_info changes Frank Terbeck
  2010-05-14  7:40 ` PATCH: (1/2) vcs_info: more minor documentation fixes Frank Terbeck
@ 2010-05-14  7:40 ` Frank Terbeck
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Terbeck @ 2010-05-14  7:40 UTC (permalink / raw)
  To: zsh-workers; +Cc: Simon Ruderich

From: Simon Ruderich <simon@ruderich.org>

This changes the default `formats' and `actionformats' styles for
vcs_info to include information enabled by the `check-for-changes'
style. Since that style is disabled by default, this doesn't change
vcs_info's default behaviour.
---
 Doc/Zsh/contrib.yo                  |    4 ++--
 Functions/VCS_Info/VCS_INFO_formats |    4 ++--
 Misc/vcs_info-examples              |    6 ------
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 2708625..665f60c 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -656,8 +656,8 @@ enditem()
 The default values for these styles in all contexts are:
 
 startsitem()
-sitem(tt(formats))(" (%s)-[%b]-")
-sitem(tt(actionformats))(" (%s)-[%b|%a]-")
+sitem(tt(formats))(" (%s)-[%b]%u%c-")
+sitem(tt(actionformats))(" (%s)-[%b|%a]%u%c-")
 sitem(tt(branchformat))("%b:%r" (for bzr, svn, svk and hg))
 sitem(tt(nvcsformats))("")
 sitem(tt(hgrevformat))("%r:%h")
diff --git a/Functions/VCS_Info/VCS_INFO_formats b/Functions/VCS_Info/VCS_INFO_formats
index 469efa7..1380919 100644
--- a/Functions/VCS_Info/VCS_INFO_formats
+++ b/Functions/VCS_Info/VCS_INFO_formats
@@ -51,10 +51,10 @@ VCS_INFO_hook 'post-backend'
 
 if [[ -n ${hook_com[action]} ]] ; then
     zstyle -a ":vcs_info:${vcs}:${usercontext}:${rrn}" actionformats msgs
-    (( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b|%a]-'
+    (( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b|%a]%u%c-'
 else
     zstyle -a ":vcs_info:${vcs}:${usercontext}:${rrn}" formats msgs
-    (( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b]-'
+    (( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b]%u%c-'
 fi
 
 if [[ -n ${hook_com[staged]} ]] ; then
diff --git a/Misc/vcs_info-examples b/Misc/vcs_info-examples
index e0f531b..742ba34 100644
--- a/Misc/vcs_info-examples
+++ b/Misc/vcs_info-examples
@@ -207,12 +207,6 @@ autoload -Uz vcs_info
 zstyle ':vcs_info:*' check-for-changes true
 zstyle ':vcs_info:*' get-revision true
 
-# Improve default formats/actionformats to display staged (%c) and
-# unstaged (%u) changes. You can change the displayed string with the
-# 'unstagedstr' and 'stagedstr' settings.
-zstyle ':vcs_info:*' formats       " (%s)-[%b]%u%c-"
-zstyle ':vcs_info:*' actionformats " (%s)-[%b|%a]%u%c-"
-
 
 # Default to running vcs_info. If possible we prevent running it later for
 # speed reasons. If set to a non empty value vcs_info is run.
-- 
1.7.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-14  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-14  7:40 PATCH: (0/2) More vcs_info changes Frank Terbeck
2010-05-14  7:40 ` PATCH: (1/2) vcs_info: more minor documentation fixes Frank Terbeck
2010-05-14  7:40 ` PATCH: (2/2) vcs_info: change default formats Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).