diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2017-02-05 08:28:13 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2017-02-09 15:24:04 +0000 |
commit | ecd88284f358cbcd787757184bbf8704779cab1a (patch) | |
tree | 98fc9e76a873dc91e18a8295070373d9727ac551 /README | |
parent | e3bc63f00e1a11df6a8a214a5d4a2e3feb59f28a (diff) | |
download | zsh-ecd88284f358cbcd787757184bbf8704779cab1a.tar.gz zsh-ecd88284f358cbcd787757184bbf8704779cab1a.tar.xz zsh-ecd88284f358cbcd787757184bbf8704779cab1a.zip |
40492: vcs_info: Escape '%' signs in payloads.
Test case: a patch whose subject is '%Sfoo%sbar'. ('S' and 's' are expandos both in prompts and in the 'formats' style.)
Diffstat (limited to 'README')
-rw-r--r-- | README | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/README b/README index 26eb24550..594b6f1cd 100644 --- a/README +++ b/README @@ -62,6 +62,15 @@ Note that functions including a non-leading / behave as before, e.g. if `dir/name' is found anywhere under a directory in $fpath it is loaded as a function named `dir/name'. +3) vcs_info: When neither a set-patch-format nor a gen-applied-string +(resp. gen-unapplied-string) hook is set, vcs_info now '%'-escapes the +applied-string (resp. unapplied-string) before interpolating it into the +patch-format string, to prevent literal `%' signs in the interpolated +value from being interpreted as prompt escape sequences. If you use +${vcs_info_msg_0_} in a context other than the shell prompt, you may need +to undo the escaping with: + print -v vcs_info_msg_0_ -Pr -- "${vcs_info_msg_0_}" + Incompatibilities between 5.0.8 and 5.3 ---------------------------------------- |