Daniel Shahaf
4c23a2fd1b
'main': Highlight lone '!' correctly: it's not a history expansion.
While here, also add a test for the '!' reserved word (which is highlighted
since c216242b
).
8 years ago
Daniel Shahaf
e500ca2462
'main': Don't highlight in vared
This is a continuation of 451665cb2a
which did
the same for the $PS3 prompt.
Reported-by: Sebastian Gniazdowski
8 years ago
Sebastian Gniazdowski
3cb58fd7d7
Optimization: -1 is extra computation of string length internally
./parse.zsh "zplugin.zsh" > out_norm.txt 106,17s user 7,84s system 98% cpu 1:55,85 total
./parse.zsh "zplugin.zsh" > out_opt.txt 51,91s user 7,44s system 99% cpu 59,912 total
% wc -l zplugin.zsh
3188 zplugin.zsh
8 years ago
Daniel Shahaf
451665cb2a
'main': Don't highlight at the $PS3 prompt.
The input to the $PS3 prompt is not commands, so the 'main' highlighter is
not applicable to it.
Fixes zsh-users/zsh-syntax-highlighting#268 .
8 years ago
Daniel Shahaf
28932316cc
aliases: Highlight aliases with '=' in their LHS as error. (Part of issue #263.)
8 years ago
Daniel Shahaf
5e4b446dee
aliases: Add a test for one variant of issue #263 .
8 years ago
Daniel Shahaf
4f3910cbba
Fix issue #248 : Highlight 'pkexec' as a precommand.
8 years ago
Daniel Shahaf
73ee7c1f6c
Fix part of issue #238 , "fd redirections at command word".
This fixes fd's specified by a (single) digit. The named fd syntax remains an XFail.
8 years ago
Daniel Shahaf
48ecd29180
tests: Add two XFail tests for issue #238 , "fd redirections at command word".
8 years ago
Daniel Shahaf
430cf55368
tests: Cover [default].
8 years ago
Daniel Shahaf
46cd970bc4
tests: Improve tests by using $unused_highlight.
The default for [redirection] is 'none', so it wasn't actually being tested.
8 years ago
Daniel Shahaf
09c4114eb9
command word: Do not attempt to interpret command separator tokens as anything else.
The important part of this change is removing the second conjunct from the
condition; the remainder of the change gives one example of when that matters.
8 years ago
Daniel Shahaf
eb3715a56a
docs: Followup to the recent docs branch: clean up some internal cross-references.
8 years ago
Matthew Martin
8e115052e9
docs: Fix broken symlinks
8 years ago
Matthew Martin
0ab450ae47
docs: Move docs into docs/
8 years ago
Matthew Martin
35e0b0ca69
docs: Remove duplicate 'How to activate it' sections
8 years ago
Matthew Martin
2dd6923c30
docs: Move highlighter headers down one level
8 years ago
Daniel Shahaf
6e99128987
docs copyedit: minor: Spelling/punctuation fix.
8 years ago
Daniel Shahaf
3f163a2fd4
docs copyedit: Rewrap to 80 columns, part 2.
8 years ago
Daniel Shahaf
9ce97cd64d
docs copyedit: minor.
8 years ago
Daniel Shahaf
12097d55d1
docs copyedit: Rewrap to 80 columns.
8 years ago
Daniel Shahaf
8ea392e361
docs copyedit: Restyle bold-italic to fixed-width.
8 years ago
Daniel Shahaf
91e4a576fb
docs copyedit: Port 6d93ea07fd
to the other highlighters' README's.
8 years ago
Daniel Shahaf
6c033e62e9
docs copyedit: Whitespace.
8 years ago
Daniel Shahaf
17fbcad8ac
'main': Fix state check.
At this time, no user-visible consequences are known.
9 years ago
Daniel Shahaf
29fd6ec1de
Support the '|&', '&!', '&|' command separators.
8 years ago
Daniel Shahaf
3ed0f7f823
noop: Consolidate two identical conditionals.
8 years ago
Daniel Shahaf
2dbcb575e5
internal: Document the ':regular' state.
8 years ago
Daniel Shahaf
00de155063
docs: 'main': Improve styles documentation.
8 years ago
Daniel Shahaf
7d4252f5f5
minor: docs: Improve dollar-double-quoted-argument documentation.
8 years ago
Daniel Shahaf
21e5e26923
docs: Clarify 'create a new highlighter' documentation.
8 years ago
Daniel Shahaf
79b95c629e
Drop unnecessary shebang lines.
Done in c30301d474
and
c687bddea3
for other tests.
8 years ago
Daniel Shahaf
3669d69226
Fix copyright year.
8 years ago
Daniel Shahaf
4fcfb15913
Highlight parameter expansions that are a command word.
Fixes zsh-users/zsh-syntax-highlighting#101 .
8 years ago
Daniel Shahaf
bdc1449733
noop: Break out a helper function.
8 years ago
Daniel Shahaf
6e3720f39d
dollar-double-quoted-argument: Support the syntax «"${foo}"». (Issue #186.)
8 years ago
Daniel Shahaf
28776371a0
tests: Add an XFail test for highlighting «"${foo}"». (Issue #186.)
8 years ago
Daniel Shahaf
4f0c293fde
cursor: Remove cursor highlighting when accepting a line.
Fixes zsh-users/zsh-syntax-highlighting#109 .
Similar to 59fbdda64c
in the 'main' highlighter.
8 years ago
Daniel Shahaf
96ee5116b1
Fix issue #228 , "Support the PATH_DIRS option".
8 years ago
Daniel Shahaf
a636527f70
tests: Add an XFail test for issue #228 , "Support the PATH_DIRS option".
This builds upon the test harness auto-cleaned-up directories work (c01533920
).
8 years ago
Daniel Shahaf
2b35ff1c15
minor: Rename a test file to a not-escape-needing name.
There's simply no reason to use such names, now that the filename is no longer
itself test data.
8 years ago
Daniel Shahaf
c015339202
tests: Provide an independent, auto-cleaned working directory to each test.
Fixes zsh-users/zsh-syntax-highlighting#182.
Prerequisite for testing issue #228 .
* tests/test-highlighting.zsh
(run_test): Move functionality to run_test_internal; make run_test be a wrapper
that handles creating and cleaning up the tempdir.
* tests/README.md: Document the new feature.
* "highlighters/main/test-data/path-space- .zsh"
* highlighters/main/test-data/path-tilde-named.zsh
* highlighters/main/test-data/path.zsh
Change test data to not depend on being run from the source directory.
8 years ago
Daniel Shahaf
3620ad951f
Add an XFail test for issue #231 , "Assignment terminating subshell flags closing parenthesis as an error".
8 years ago
Daniel Shahaf
b285c7b821
brackets: Highlight closing ')' of array assignments correctly. (Issue #226.)
Followup to c0dafd1d850e582291b41d693369794d1ea31343, which changed the highlight of
those ')'s from <nothing> to [reserved-word].
8 years ago
Daniel Shahaf
c0dafd1d85
brackets: Highlight the closing brackets of subshells and blocks. (Issue #226.)
9 years ago
Daniel Shahaf
28abb960de
noop: Follow-up to last: improve readability.
9 years ago
Daniel Shahaf
a59f442d2d
brackets: Highlight the closing brackets of arithmetic expansion. (Issue #226.)
9 years ago
Daniel Shahaf
8b4adbd991
Fix issue #222 , "command word after repeat".
9 years ago
Daniel Shahaf
6fbd2aa957
Add an XFail test for issue #222 , "command word after repeat".
9 years ago
Daniel Shahaf
9e178f9f39
subshells: Highlight the opening parenthesis correctly. (Issue #166.)
Followup to 0d1bfbcbfa
.
9 years ago