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.
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.
* 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.
Fixeszsh-users/zsh-syntax-highlighting#195.
The one revision made on master between this branch's creation and merge
already uses correct offsets.
* danielsh/i195-tests-offbyone-v1:
New test for dollar-double-quoted-argument.
test harness: Fix off-by-one discrepancy between observed and expected.
'local' is a reserved word in zsh 5.1 but not in earlier versions [1].
Therefore, under zsh older than 5.1, quoting is required.
This manifested as random «builtin=''» in emitted to the terminal, and
commands (such as 'echo') highlighted as errors (in red).
[1] https://github.com/zsh-users/zsh/blob/master/README#L46
(the section "Incompatibilites between 5.0.8 and 5.1")