Daniel Shahaf
c2b9327b07
Support literal newlines, part 2
преди 9 години
Daniel Shahaf
52ece975c3
Update comments. No functional change.
преди 9 години
Daniel Shahaf
359d48bf78
Don't highlight prefix redirections as error
Fixes zsh-users/zsh-syntax-highlighting#146
преди 9 години
Daniel Shahaf
ff4d402e9a
Highlight the first part of multiline strings correctly
Given the following input:
PREBUFFER=$'echo "foo\n'
BUFFER='bar"'
This patch causes the '"foo' part to be highlighted as a string. There
is no test because the tests only check highlighting of BUFFER, and 'bar"'
is already highlighted correctly.
преди 9 години
Daniel Shahaf
384be15b13
Support literal newlines
преди 9 години
Daniel Shahaf
23cacb12fe
Support backslash continuations
преди 9 години
Daniel Shahaf
667495bfb7
Support multiline strings
преди 9 години
Daniel Shahaf
2c5acaefa9
Refactoring, no functional change
The new function will be used in the next commit.
преди 9 години
Joost Cassee
d7d4dff1c8
Add 'line' highlighter for the whole buffer
преди 10 години
Randy
e8cc271314
Resolves slow performance in brackets highlighter
преди 10 години
sonnym
04f9c8884f
highlight ^old^new pattern
by extending the already in place mechanism of checking for the first
histchar to check for the second as well
преди 10 години
Lucas Hoffmann
784a5dc35b
protect alias expansion from interpreting aliases as options
If one defines aliases like `++` the alias builtin tries to interprete these
as options so they have to be protected like this
alias -- ++=true
The same goes for a call to `alias` in order to expand the alias again.
преди 11 години
Mark Lodato
441f1a8aad
highlight array assignments of the form x[y]=...
This code is more lenient than bash. Examples:
$ x[y[]=
zsh: no matches found: x[y[]=
$ x[][]=
zsh: no matches found: x[][]=
The proper solution is to look inside the [...] and make sure that all
unescaped/unquoted square brackes are matched, but that is a heck of
a lot more complicated than this simple 8-character patch.
преди 11 години
Mark Lodato
c62cb54e9d
do not remove quotes when checking assignments
Zsh does not allow the variable name or the equals sign to be quoted or
escaped. The previous code incorrectly highlighted the following
examples as assignments:
$ 'x=y'
zsh: command not found: x=y
$ x\=y
zsh: command not found: x=y
$ "x"=y
zsh: command not found: x=y
$ \x=y
zsh: command not found: x=y
преди 11 години
Akinori MUSHA
0fc6b07509
Do not leak a variable: cdpath_dir.
Leaking a variable that holds a path in CDPATH could easily end up appearing on your prompt like `~cdpath_dir/subdir`.
преди 11 години
Antoine Catton
3b3a58be91
Fix #121 : sudo syntax highlighting incorrectly
Parse sudo command line in order to highlight the options correctly
преди 11 години
Julien Nicoulaud
dbd27cb30a
#155 : document path_prefix/path_approx
преди 11 години
Shura
a7ee0597ef
Update main-highlighter.zsh
Comments added
преди 11 години
Владимир
57c01d19de
Update main-highlighter.zsh
Add support of CDPATH
преди 11 години
Shura
8abcf187f6
dollar variable and backslash codes highlighting
преди 11 години
James Kyle
93827ed84d
Issue #92 Eliminates system bell errors on osx.
Prepended an 'if' to remove error bell on osx systems.
преди 11 години
Vincent Breitmoser
228f5a6aad
add separate path_prefix and path_approx hilights
преди 11 години
Chris Knadler
612e493cba
Fix relative links in highlighters readme
преди 11 години
Takeshi Banse
b4e667795c
make $pattern local to _zsh_highlight_pattern_highlighter #97
Signed-off-by: Takeshi Banse <takebi@laafc.net>
преди 11 години
evan
19981ef9ea
added sudo as a precommand
преди 12 години
Jan M. Binder
732b7d6e65
Fix bracket highlighter
преди 12 години
Jud Porter
d82eee5212
add emulate -L zsh to _zsh_highlight_main_highlighter. resolves issue #83
преди 12 години
Julien Nicoulaud
f824e5e84d
Options should only be set locally
преди 13 години
Andreas Gahr
024c1c46f7
next try. fix for issue #76 without brakeing fix for #21
преди 13 години
Julien Nicoulaud
8d4cde6301
(Hopefully) fix #21 (tilde and hashed directories in paths)
преди 13 години
Julien Nicoulaud
db8f98fc53
Set default style for pipes and stuff to none
преди 13 години
Andreas Gahr
287167d453
fix for issue #76 . This was more ore less forgotten in pull request #75
преди 13 години
Andreas Gahr
670961ad01
handle highlighting for precommands; handle highlighting for commands separators
преди 13 години
Andreas Gahr
f84f9319d8
supposed fix for issue #73 and issue #74
преди 13 години
Julien Nicoulaud
a6d105131c
Fix #21 : No highlighting when using tilde
преди 13 години
Takeshi Banse
1d729202ec
add tests for handling tildes
Signed-off-by: Takeshi Banse <takebi@laafc.net>
преди 13 години
Takeshi Banse
48a18291f9
add some tests
Signed-off-by: Takeshi Banse <takebi@laafc.net>
преди 13 години
Takeshi Banse
4a8b184632
pass ${arg} explicit
Signed-off-by: Takeshi Banse <takebi@laafc.net>
преди 13 години
Andreas Gahr
b1b65dc486
bracket highlighter: small typo in testcase - document new style
преди 13 години
Andreas Gahr
06ad03e32c
bracket highlighter: simplify
преди 13 години
Andreas Gahr
8375ef6e72
bracket highlighter: make the style configurable, when cursor is on bracket
преди 13 години
Andreas Gahr
24243becba
bracket highlighter: fix typo from last commit
преди 13 години
Andreas Gahr
e1ed255c0a
bracket highlighter: start loops with 0 which is more natural and also more in line whith the other highlighters
преди 13 години
Andreas Gahr
0d55207c78
simple testcases for bracket highlighter - actually add files
преди 13 години
Andreas Gahr
33813c6a52
simple testcases for bracket highlighter
преди 13 години
Valodim
f27ef7a279
after exec token we can expect a command
преди 13 години
Julien Nicoulaud
08dae96eb1
Add highlighter triggered when the user is root
преди 13 години
Julien Nicoulaud
11de634b33
Add cursor highlighter
преди 13 години
garinger
e7ab165310
* optimize discrimination of bracket-type
* use a nicer variable name
преди 13 години
garinger
f1eb5aeef7
skip all brackets inside quotes (" and ')
преди 13 години