Daniel Shahaf
359d48bf78
Don't highlight prefix redirections as error
Fixes zsh-users/zsh-syntax-highlighting#146
9 yıl önce
Joost Cassee
d7d4dff1c8
Add 'line' highlighter for the whole buffer
10 yıl önce
Randy
e8cc271314
Resolves slow performance in brackets highlighter
10 yıl önce
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 yıl önce
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 yıl önce
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 yıl önce
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 yıl önce
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 yıl önce
Antoine Catton
3b3a58be91
Fix #121 : sudo syntax highlighting incorrectly
Parse sudo command line in order to highlight the options correctly
11 yıl önce
Julien Nicoulaud
dbd27cb30a
#155 : document path_prefix/path_approx
11 yıl önce
Shura
a7ee0597ef
Update main-highlighter.zsh
Comments added
11 yıl önce
Владимир
57c01d19de
Update main-highlighter.zsh
Add support of CDPATH
11 yıl önce
Shura
8abcf187f6
dollar variable and backslash codes highlighting
11 yıl önce
James Kyle
93827ed84d
Issue #92 Eliminates system bell errors on osx.
Prepended an 'if' to remove error bell on osx systems.
11 yıl önce
Vincent Breitmoser
228f5a6aad
add separate path_prefix and path_approx hilights
11 yıl önce
Chris Knadler
612e493cba
Fix relative links in highlighters readme
11 yıl önce
Takeshi Banse
b4e667795c
make $pattern local to _zsh_highlight_pattern_highlighter #97
Signed-off-by: Takeshi Banse <takebi@laafc.net>
11 yıl önce
evan
19981ef9ea
added sudo as a precommand
12 yıl önce
Jan M. Binder
732b7d6e65
Fix bracket highlighter
12 yıl önce
Jud Porter
d82eee5212
add emulate -L zsh to _zsh_highlight_main_highlighter. resolves issue #83
12 yıl önce
Julien Nicoulaud
f824e5e84d
Options should only be set locally
13 yıl önce
Andreas Gahr
024c1c46f7
next try. fix for issue #76 without brakeing fix for #21
13 yıl önce
Julien Nicoulaud
8d4cde6301
(Hopefully) fix #21 (tilde and hashed directories in paths)
13 yıl önce
Julien Nicoulaud
db8f98fc53
Set default style for pipes and stuff to none
13 yıl önce
Andreas Gahr
287167d453
fix for issue #76 . This was more ore less forgotten in pull request #75
13 yıl önce
Andreas Gahr
670961ad01
handle highlighting for precommands; handle highlighting for commands separators
13 yıl önce
Andreas Gahr
f84f9319d8
supposed fix for issue #73 and issue #74
13 yıl önce
Julien Nicoulaud
a6d105131c
Fix #21 : No highlighting when using tilde
13 yıl önce
Takeshi Banse
1d729202ec
add tests for handling tildes
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 yıl önce
Takeshi Banse
48a18291f9
add some tests
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 yıl önce
Takeshi Banse
4a8b184632
pass ${arg} explicit
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 yıl önce
Andreas Gahr
b1b65dc486
bracket highlighter: small typo in testcase - document new style
13 yıl önce
Andreas Gahr
06ad03e32c
bracket highlighter: simplify
13 yıl önce
Andreas Gahr
8375ef6e72
bracket highlighter: make the style configurable, when cursor is on bracket
13 yıl önce
Andreas Gahr
24243becba
bracket highlighter: fix typo from last commit
13 yıl önce
Andreas Gahr
e1ed255c0a
bracket highlighter: start loops with 0 which is more natural and also more in line whith the other highlighters
13 yıl önce
Andreas Gahr
0d55207c78
simple testcases for bracket highlighter - actually add files
13 yıl önce
Andreas Gahr
33813c6a52
simple testcases for bracket highlighter
13 yıl önce
Valodim
f27ef7a279
after exec token we can expect a command
13 yıl önce
Julien Nicoulaud
08dae96eb1
Add highlighter triggered when the user is root
13 yıl önce
Julien Nicoulaud
11de634b33
Add cursor highlighter
13 yıl önce
garinger
e7ab165310
* optimize discrimination of bracket-type
* use a nicer variable name
13 yıl önce
garinger
f1eb5aeef7
skip all brackets inside quotes (" and ')
13 yıl önce
garinger
2fe9505647
simplify check for bracket under cursor
13 yıl önce
garinger
05e4a031c7
* remove a safety belt - no need to check if array has elements, as defaults are provided
* reuse $pos instead of using another variable
* remove declaration forgotten in last commit
13 yıl önce
garinger
d4acac9837
eliminate a variable and simplify
13 yıl önce
garinger
ef74d2b611
Only match brackets of the same type
13 yıl önce
garinger
48c30a805a
highlight opening bracket with "bracket-error" style, if the closing bracket is still missing
13 yıl önce
Julien Nicoulaud
e7d7ccfe35
Group if statements in f26310d97e
13 yıl önce
Guido
f26310d97e
* enable command lines starting with a hyphen.
13 yıl önce