diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2022-01-29 16:15:25 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2022-02-20 10:16:33 +0000 |
commit | 80389df48067bab3711ad1604bc9554d08fb9994 (patch) | |
tree | 7c352b5c424fc143f883d318239aed2c3454df0a /Functions/VCS_Info/VCS_INFO_set-patch-format | |
parent | b8b7d9b46ac54c4494ec74b2b7ca4c06861eb75d (diff) | |
download | zsh-80389df48067bab3711ad1604bc9554d08fb9994.tar.gz zsh-80389df48067bab3711ad1604bc9554d08fb9994.tar.xz zsh-80389df48067bab3711ad1604bc9554d08fb9994.zip |
49727 (+ comment): vcs_info quilt: Pass the patches dir path to the gen-applied-string, gen-unapplied-string, and set-patch-format hooks
I use that in my gen-applied-string hook.
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_set-patch-format')
-rw-r--r-- | Functions/VCS_Info/VCS_INFO_set-patch-format | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_set-patch-format b/Functions/VCS_Info/VCS_INFO_set-patch-format index c35b695c3..1c774a7f6 100644 --- a/Functions/VCS_Info/VCS_INFO_set-patch-format +++ b/Functions/VCS_Info/VCS_INFO_set-patch-format @@ -15,6 +15,8 @@ # $7 - name of an assoc parameter with extra $hook_com key-value pairs for the # set-patch-format hook invocation, or '' for none # $8 - name of a function that sets $reply to extra arguments for the patch-format zformat call, or '' for none +# $9 - name of an assoc parameter with extra $hook_com key-value pairs for the +# gen-applied-string & gen-unapplied-string hook invocations, or '' for none # # The expanded patch-format string is returned in $REPLY. # @@ -22,8 +24,10 @@ # - $hook_com is overwritten and the keys 'applied', 'applied-n', # 'unapplied', 'unapplied-n', 'all-n' are set. { + hook_com=() + local applied_needs_escaping='unknown' - local unapplied_needs_escaping='unknown' + hook_com+=( ${9:+"${(@kvP)9}"} ) if VCS_INFO_hook 'gen-applied-string' "${(@P)1}"; then if (( ${(P)#1} )); then REPLY=${(P)1[1]} @@ -37,6 +41,8 @@ : ${(P)2::=$REPLY} hook_com=() + local unapplied_needs_escaping='unknown' + hook_com+=( ${9:+"${(@kvP)9}"} ) if VCS_INFO_hook 'gen-unapplied-string' "${(@P)3}"; then REPLY=${(P)#3} unapplied_needs_escaping='yes' |