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.
Highlight the last character of a «\xHH» escape when it is the last thing in
LBUFFER. This is similar to what b0cc02ed86e3586ab92cc1082fb97b94cd5f584f did
for issue #186.
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.)
This was broken by c2b9327b0763f3457fb09db17e22ee9e1e024792
and tracked as zsh-users/zsh-syntax-highlighting#199.
This fixes the vanilla-newline.zsh test, which was was (consciously) broken
by the previous commit.
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.