Fixeszsh-users/zsh-syntax-highlighting#188 in the case that both the
opening '((' and closing '))' have been typed, The case that only the
opening '((' have been typed is also fixed, but requires a zsh development
build (zsh-5.1.1-52-g4bed2cf or newer); see comments within.
Without this, redirections, history expansions, and command separators would
be matched by path_approx.
A test case is simply LBUFFER="<" RBUFFER="" (highlighted as redirection with this
fix and as path_approx without it).
Fixeszsh-users/zsh-syntax-highlighting#204.
Remove highlighting of hex and octal escapes in "" strings (which don't parse
those escapes), add it to $'' strings (which do), and correct the regexps.
Also add support for unicode \u/\U escapes.
Fixeszsh-users/zsh-syntax-highlighting#196.
* danielsh/i196-back-dollar-quoted-v1:
back-dollar-quoted-argument: Correct an off-by-one.
back-dollar-quoted-argument: Correct octal escape syntax.
back-dollar-quoted-argument: Highlight \uHHHH and \UHHHHHHHH escapes.
back-dollar-quoted-argument: Don't consider \0xHH a hex escape sequence.
back-dollar-quoted-argument: Don't consider comma a hex character.
Highlight backslash escapes within $'' strings.
Correct highlighting of backslash escapes within "" strings: highlight only
the four specific escape sequences defined there.
Fixeszsh-users/zsh-syntax-highlighting#196.
See issue #137. A reproduction recipe for testing this change:
$ zsh -f
% bindkey -e
% source <the script from http://www.zsh.org/mla/users/2014/msg00321.html users/18584>
% source zsh-syntax-highlighting.zsh
% echo foo
% echo bar
% <^R>echo<^R>
This finds the 'echo foo' with this change but not without it.
* highlighters/main/test-data/hashed-command.zsh:
Set the right region key. This makes the test more specific.
(Issue #184 would have caught this bug.)
Notably, the 'single-hyphen-option' and 'assign' contexts both default to the
'none' style, so before this patch, the tests would not have detected a failure
to apply those two contexts.
For other contexts, using $unused_highlight only helps detect the case where
the right highlight style (e.g., 'fg=yellow') is used as a result of applying
the wrong context — which should be a theoretical failure mode.
This is part of zsh-users/zsh-syntax-highlighting#198.
In region_highlight, a spec of the form 'i j foo' with i >= j should have no effect.
Before this commit, however, the {$i..$j} range would happily expand to (5 4 3)
if i > j were the case (e.g., i=5 and j=3).
This breaks vanilla-newline.zsh; the next commit will fix that.