diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-04-29 00:30:17 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-05-02 01:12:07 +0000 |
commit | 34d69acbef44f654ea51d762ffdb02f5b1e8b9e1 (patch) | |
tree | 78812032a1ac8e24688ec93b3b1539ca257b69d2 /README | |
parent | 95adde8ddc744af744975a58dccd2c3cc53b5333 (diff) | |
download | zsh-34d69acbef44f654ea51d762ffdb02f5b1e8b9e1.tar.gz zsh-34d69acbef44f654ea51d762ffdb02f5b1e8b9e1.tar.xz zsh-34d69acbef44f654ea51d762ffdb02f5b1e8b9e1.zip |
45737 (+ docs, and update the test from 45722): zstyle: When determining the weight (specificity) of a pattern, consider the number of components before anything else, as documented.
Diffstat (limited to 'README')
-rw-r--r-- | README | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/README b/README index b87f660bf..8ae615153 100644 --- a/README +++ b/README @@ -64,6 +64,25 @@ The sh-compatible function definition syntax, "f() { ... }", is unchanged. The time-out (-t) value given to zsh/system's `zsystem flock` command is now limited to 2^30-1 seconds (= a little over 34 years). +zstyle: For background, recall that the zstyle builtin associates styles with +values for particular contexts, and when a context (such as ':foo:bar:baz') is +matched by multiple patterns (such as ':foo:*' and ':foo:bar:*'), the style's +value for the more specific of the patterns is used. In zsh 5.8 and earlier +the determination of which pattern is "more specific" used semantics slightly +different to those the documentation promised. The implementation was changed +to match the documentation. The upshot of this is that if you set a single +style in multiple contexts, zsh 5.9 may use the values set for a pattern other +than the one zsh 5.8 used. For example, if you do + zstyle ':foo:bar:*' style value1 + zstyle ':foo:*:baz:*' style value2 +and the style is looked up under a context that both patterns match (e.g., +:foo:bar:baz:qux), zsh 5.9 will use value2 -- which is consistent with the +documentation of both 5.8 and 5.9 -- but zsh 5.8 will use value1. If this +affects you, make the implied colons in the first pattern explicit, as in: + zstyle ':foo:bar:*:*' style value1 + zstyle ':foo:*:baz:*' style value2 +This will use value1 in both 5.8 and 5.9. + Incompatibilities between 5.7.1 and 5.8 --------------------------------------- |