about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_quilt
diff options
context:
space:
mode:
authorFrank Terbeck <bewater@users.sourceforge.net>2012-08-17 08:22:52 +0000
committerFrank Terbeck <bewater@users.sourceforge.net>2012-08-17 08:22:52 +0000
commit3aae0ef8fecd69c983e6452a6b4f9c641cac9ab1 (patch)
treefc49a99a35e9f5d34cacd36151e3e535490ec1aa /Functions/VCS_Info/VCS_INFO_quilt
parent402e5fb2ab2250cbef67b623e5777791ac37d855 (diff)
downloadzsh-3aae0ef8fecd69c983e6452a6b4f9c641cac9ab1.tar.gz
zsh-3aae0ef8fecd69c983e6452a6b4f9c641cac9ab1.tar.xz
zsh-3aae0ef8fecd69c983e6452a6b4f9c641cac9ab1.zip
Stepan Koltsov: vcs_info: %a to output number of all patches in (no)?patch-format styles
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_quilt')
-rw-r--r--Functions/VCS_Info/VCS_INFO_quilt8
1 files changed, 5 insertions, 3 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index fc127c23b..7001eca07 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -89,7 +89,7 @@ function VCS_INFO_quilt() {
     local patches pc tmp qstring root
     local -i ret
     local -x context
-    local -a applied unapplied applied_string unapplied_string quiltcommand
+    local -a applied unapplied all applied_string unapplied_string quiltcommand
     local -Ax hook_com
 
     context=":vcs_info:${vcs}.quilt-${mode}:${usercontext}:${rrn}"
@@ -142,6 +142,8 @@ function VCS_INFO_quilt() {
         unapplied=()
     fi
 
+    all=( ${(Oa)applied} ${unapplied} )
+
     if VCS_INFO_hook 'gen-applied-string' "${applied[@]}"; then
         if (( ${#applied} )); then
             applied_string=${applied[1]}
@@ -164,10 +166,10 @@ function VCS_INFO_quilt() {
         zstyle -s "${context}" nopatch-format qstring || qstring="no patch applied"
     fi
     hook_com=( applied "${applied_string}" unapplied "${unapplied_string}"
-               applied-n ${#applied}       unapplied-n ${#unapplied} )
+               applied-n ${#applied}       unapplied-n ${#unapplied}       all-n ${#all} )
     if VCS_INFO_hook 'set-patch-format' ${qstring}; then
         zformat -f qstring "${qstring}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
-                                        "n:${#applied}" "c:${#unapplied}"
+                                        "n:${#applied}" "c:${#unapplied}" "a:${#all}"
     else
         qstring=${hook_com[patch-replace]}
     fi