Fixes#356 (the pull request being merged).
Fixes#245 (the meta-issue for the following redrawhook issues).
Fixes#40.
Fixes#90.
Fixes#150.
Fixes#154.
Fixes#183.
Fixes#377.
* upstream/pr/356:
test harness: Actually test the new code.
driver: Rewrite without a state variable
noop: Make a whitespace-only change to reduce noise in the next commit.
docs: Rewrap.
docs: Update FAQ answer per changes on this branch.
redo _zsh_highlight__function_callable_p
driver: Use a different way of checking whether add-zle-hook-widget is present.
changelog: Use a more specific link.
changelog: Note the effect of fixing #245/#90 and an alternative.
driver: Pass zle-line-finish arguments on to _zsh_highlight.
driver: Hook zle-line-finish.
driver: Reimplement using 'add-zle-hook-widget zle-line-pre-redraw'
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (workers/36650).
* upstream/master:
'main': Enable fallback to the 'arg0' style.
'main': Set fallback style for the 'arg0' style.
dev tools: Automagically handle newlines (\n) in $BUFFER.
tests: Also test arguments to an anonymous function.
'main': Directly count spaces to skip, don't leverage proc_buf length
'main': Highlight several more special (non-alphabetic) parameters.
'main': Highlight shell's PID ($$) inside double quotes.
'main': Highlight command substitutions inside double quotes.
'main': Permit subshells to end at command position.
'main': Highlight mismatched foreach/end.
dev tools: Add a TODO to introduce code reuse.
'main': Highlight mismatched do/done.
'main': Yet another test for mismatched braces.
'main' / *_check_path: Precompute $#BUFFER and use it for speed gain
dev tools: Remove a superfluous empty line.
'main': Highlight 'always' blocks.
'main': Don't find command positions within multiline array literals.
dev tools: Stage the copyright block to make diffs smaller.
dev tools: Tolerate invalid input.
'main': Restore compatibility with zsh-4.3.14 and older (after e3182c18de8f).
dev tools: Automate a recurring step: Set year correctly for new tests.
'main': Highlight first command word in named functions defined in the sh syntax when MULTI_FUNC_DEF is set.
'main': More tests for mismstached parentheses and braces.
'main': Highlight mismatched parentheses and braces.
driver: Warn just once when a highlighter is missing.
'main': Support the IGNORE_BRACES option.
'main': Add tests for the IGNORE_BRACES option.
'main': Followup to 51614ca2c994: Run cheaper conditions first.
'brackets': Don't highlight corresponding bracket on accept-line
driver: Declare global variables
'main': Avoid triggering a zsh bug related to hashed commands.
*: error messages: Fix quoting.
highlighters: Rename entry points.
driver: Rename highlighter entry points
driver: Followup to 80148f6c840299f0980f4359ec5307ca63837dff: don't squat on the highlighters' namespace.
driver: Followup to d711563fe1bf8fa6810bc34ac92a2fd3150290ed: actually make the driver reentrant.
noop: Rewrap.
README: Add a reference to upstream's documentation.
README: Rephrase a question non-negatively^W neutrally.
noop: Add comments.
'main': The word after 'sudo' is only a non-command word if it is an option.
'main': Test for redirection earlier.
noop: Restructure code for clarity.
noop: Fix indentation.
driver: Followup to last: make the value more unique.
driver: Make it reentrant.
minor: Fix typo in development usage message.
driver: Enable highlighting during isearch under zsh≥5.3.
driver: Don't highlight in isearch
driver: Always bind zle-line-finish and use it instead of accept-*
driver: Widget binding: Support binding incomplete/nonexistent widgets
dev tools: Extend tests/generate.zsh.
dev tools: Add a script that generates a test-data file.
'main': Enable test for issue #238.
'main': Add test for issue #343, concerning the 'command' precommand.
'main': New test, related to issue #328.
*: s/echo/print/
'main': Highlight a broken symlink as a file.
tests: Add an XFail test for issue #342.
docs: Minor tweak.
docs: State highlighters' designated namespace.
docs: s/myhighlighter/acme/g
driver: Change a variable name to avoid squatting the highlighters' namespace.
tests: Add a regression test for issue #267, concerning highlighting a vi linewise region.
driver: Widget binding: Use ${(k)widgets} instead of $(zle -la)
Support linewise region.
Conflicts:
README.md
zsh-syntax-highlighting.zsh
The fallback style name uses '_' in anticipation of a future auto-fallback
feature keyed on style names.
'arg0' was previously known as 'commandtypefromthefuture'.
Main highlighter run on itself, on the optimized version:
- optimized (8 runs, 3 last noted):
1.1201650000
1.1074430000
1.1263810000
- unoptimized (8 runs, 3 last noted):
1.5746400000
1.5115250000
1.5155440000
Average difference: 0.415907
Running main highlighter on itself (both runs are on the optimized
version):
- clean (8 runs, last 3 noted):
1.7007670000
1.7330720000
1.7038810000
- optimized (8 runs, last 3 noted):
1.5007230000
1.5142960000
1.4973320000
Average difference: 0.208456
When parsing main-highlighter with itself, the *_check_path function is
called 426 times. Note that there are 686 region_highlight resulting
entries.