aboutsummaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-07 20:22:58 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-20 23:38:04 +0000
commitb110d6d5afe2c8529799b4ebd433399f080bcdf0 (patch)
tree66c7c7aeb44b980ba46ada72f1c0a46aa2702880 /Doc
parentc40a63ab673d270d7648b3d057e1c7c42cce73b6 (diff)
downloadzsh-b110d6d5afe2c8529799b4ebd433399f080bcdf0.tar.gz
zsh-b110d6d5afe2c8529799b4ebd433399f080bcdf0.tar.xz
zsh-b110d6d5afe2c8529799b4ebd433399f080bcdf0.zip
48435 (tweaked): vcs_info docs: applied-string/unapplied-string: Correct an omission in the documentation and add an example.
The example code is a reduced version of my function from workers/47519, with one bug fixed. (In workers/47519, if $1 doesn't contain spacesĀ - which is the case under hg mq - then $H and $s will be set to the same value.) Tweaked: Extended the contrib.yo hunk with details about mq.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/contrib.yo15
1 files changed, 12 insertions, 3 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 3c4fdded0..8bf1a208e 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1652,10 +1652,17 @@ Called in the tt(git) (with tt(stgit) or during rebase or merge), and tt(hg)
is generated; the tt(use-quilt) zstyle must be true for tt(quilt) (the tt(mq)
and tt(stgit) backends are active by default).
-This hook gets the names of all applied patches which tt(vcs_info) collected
-so far in the opposite order, which means that the first argument is the
+The arguments to this hook describe applied patches
+in the opposite order, which means that the first argument is the
top-most patch and so forth.
+When the patches' log messages can be extracted, those are embedded
+within each argument after a space, so each argument is of the form
+`var(patch-name) var(first line of the log message)', where var(patch-name)
+contains no whitespace. The tt(mq) backend passes arguments of
+the form `var(patch name)', with possible embedded spaces, but without
+extracting the patch's log message.
+
When setting tt(ret) to non-zero, the string in
tt(${hook_com[applied-string]}) will be
available as tt(%p) in the tt(patch-format) and tt(nopatch-format) styles.
@@ -1669,9 +1676,11 @@ tt(mq)) backend and in tt(quilt) support when the tt(unapplied-string) is
generated; the tt(get-unapplied) style must be true.
This hook gets the names of all unapplied patches which tt(vcs_info)
-collected so far in order, which means that the first argument is
+in order, which means that the first argument is
the patch next-in-line to be applied and so forth.
+The format of each argument is as for tt(gen-applied-string), above.
+
When setting tt(ret) to non-zero, the string in
tt(${hook_com[unapplied-string]}) will be available as tt(%u) in the
tt(patch-format) and tt(nopatch-format) styles.