Commit Graph

246 Commits

Author SHA1 Message Date
jimmijj 6d9a34065c Add condition that path_approx should be highlighted only if $#arg > 3, otherwise it matches too many things. (but do we need path_approx at all?) 2014-10-03 13:37:52 +00:00
jimmijj 4a82aab578 Check for TOKENS_COMMANDSEPARATOR even if $new_expression=false to highlight properly consecutive command separators like 'echo a; ; ; echo b'. 2014-10-03 13:01:27 +00:00
jimmijj bd2e00a4a9 Excluded several widgets from overriding following http://www.zsh.org/mla/users/2014/msg00308.html advise to resolve issue #137 2014-09-30 00:53:19 +00:00
jimmijj df2041e2d6 Make a few variables local 2014-09-29 13:30:26 +00:00
jimmijj a21f6ad6c4 Changed screenshot link in README.md to relative path 2014-09-27 01:22:59 +00:00
jimmijj 5ea0c05977 TODO mostly done, so deleted 2014-09-26 23:33:56 +00:00
jimmijj 5d85b535c7 Small correction in README.md 2014-09-26 22:20:42 +00:00
jimmijj 294c353a02 Add screenshot.png to git 2014-09-26 20:59:01 +00:00
jimmijj 6035534f8c Created small image at misc/screenshot.png and added it to README.md. 2014-09-26 20:56:29 +00:00
jimmijj 7e334e7fe8 Add ZSH_HIGHLIGHT_STYLES[file] style to change color for all files at once 2014-09-26 20:14:45 +00:00
jimmijj d69a3685fc Add description of highlighting style for files to highlighter/main/README.md 2014-09-26 19:26:10 +00:00
jimmijj 03822157ac Merge remote-tracking branch 'upstream/master' 2014-09-26 16:27:32 +00:00
nicoulaj 3dc5741900 Merge pull request #140 from randomize/pr_fix_issue_#77
Pr fix issue #77
2014-09-24 22:58:20 +02:00
nicoulaj 10391d025a Merge pull request #134 from sonnym/enable_quick_history_substitution_highlighting
highlight ^old^new pattern
2014-09-24 22:54:21 +02:00
nicoulaj 443908b9a2 Merge pull request #142 from jcassee/master
Add 'line' highlighter for the whole buffer
2014-09-24 22:50:54 +02:00
nicoulaj eb9870f4db Merge pull request #143 from vincentbernat/fix/yank-pop
zle: don't override yank/yank-pop
2014-09-24 22:49:21 +02:00
jimmijj 50695edee6 TODO update 2014-09-24 16:03:29 +00:00
jimmijj 4a3b2cd89f Add TODO file 2014-09-24 01:51:14 +00:00
jimmijj f342c5e0cd Added missing separators: '&|', '|&' and '&!' 2014-09-24 00:04:49 +00:00
jimmijj 28a5c6e3f0 Add highlighting for files based on $LS_COLORS environment variable. 2014-09-23 23:44:45 +00:00
jimmijj 85d1268b5a Changed ${#BUFFER} to ${#LBUFFER} in function _zsh_highlight_main_highlighter_check_path() in order to allow edit in the middle of the line without losing path colors in some cases 2014-09-23 23:02:54 +00:00
jimmijj 1a8e14fad2 Add command_prefix style 2014-09-23 22:38:27 +00:00
Vincent Bernat 74a183447d zle: don't override yank/yank-pop
`yank-pop` relies on the fact that the last zle command is `yank` or
`yank-pop` to work correctly. Rewriting them prevents this check to work
correctly breaking `yank-pop`.

This fix just disallow overriding of those two zle commands. As a
side-effect, syntax highlighting will not happen when using.

This fixes #99.
2014-06-29 11:52:32 +02:00
Joost Cassee d7d4dff1c8 Add 'line' highlighter for the whole buffer 2014-06-08 00:04:00 +02:00
Randy 7edd08156e Chaned main highlighter alorithm to resolve issue #77 2014-03-29 22:52:10 +02:00
Randy e8cc271314 Resolves slow performance in brackets highlighter 2014-03-24 08:45:34 +02:00
Julien Nicoulaud 5320f1e18d Merge pull request #135 from arcan1s/patch-1
Update README.md
2014-01-15 04:15:52 -08:00
Evgeniy Alexeev dcb5da9457 Update README.md
Edited links to Archlinux packages (the link to `zsh-syntax-highlighting-git` is out-of-date, and `zsh-syntax-highlighting` is now available in [community])
2014-01-09 04:21:35 +03:00
Julien Nicoulaud c83e266888 #110: Now using :A modifier, bump zsh version requirement 2013-12-24 12:40:35 +01:00
Julien Nicoulaud 072c064d2a Merge pull request #110 from xaocon/master
small change to find highlighting directory better
2013-12-24 03:39:37 -08:00
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
2013-12-07 05:11:19 -05:00
Julien Nicoulaud f289a9f8e7 Merge pull request #125 from acatton/fix-121
Fix #121: sudo syntax highlighting incorrectly
2013-11-19 11:42:03 -08:00
Julien Nicoulaud 8ac964186d Merge pull request #131 from MarkLodato/array-assignments
Properly highlight array assignments
2013-11-19 11:40:29 -08:00
Julien Nicoulaud ffce2a0b20 Merge pull request #133 from lucc/master
protect alias expansion from interpreting aliases as options
2013-11-19 11:39:40 -08:00
Julien Nicoulaud 63a720af9b Merge pull request #128 from knu/patch-1
Do not leak a variable: cdpath_dir.
2013-11-19 11:38:50 -08:00
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.
2013-11-05 00:50:20 +01:00
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.
2013-10-30 00:53:46 -04:00
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
2013-10-30 00:00:16 -04:00
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`.
2013-10-21 21:18:38 +09:00
Evan Pitstick dffbab0c92 a more simple and universal way (for zsh projects) to find highlight dir path 2013-10-09 12:02:34 -04:00
Antoine Catton 3b3a58be91 Fix #121: sudo syntax highlighting incorrectly
Parse sudo command line in order to highlight the options correctly
2013-09-28 19:33:34 -06:00
Julien Nicoulaud dbd27cb30a #155: document path_prefix/path_approx 2013-08-09 09:56:28 +02:00
Julien Nicoulaud 08b80022ca Merge pull request #123 from Shura0/master
Highlighted dollar variable ver. 2
2013-08-09 00:47:32 -07:00
Shura a7ee0597ef Update main-highlighter.zsh
Comments added
2013-08-09 10:24:14 +04:00
Julien Nicoulaud 3677b75731 Merge pull request #115 from Valodim/master
add separate path_prefix and path_approx hilights
2013-08-08 07:31:46 -07:00
Julien Nicoulaud 3f2c76f393 Merge pull request #116 from jameskyle/feature/Issue-#92-silence-system-bell-in-osx
Issue #92 Eliminates system bell errors on osx.
2013-08-08 07:26:22 -07:00
Julien Nicoulaud 6fcdb06b28 Merge pull request #122 from shockone/master
Update main-highlighter.zsh
2013-08-08 07:25:54 -07:00
Владимир 57c01d19de Update main-highlighter.zsh
Add support of CDPATH
2013-08-07 03:21:15 +03:00
Shura 8abcf187f6 dollar variable and backslash codes highlighting 2013-07-29 17:33:34 +04:00
James Kyle 93827ed84d Issue #92 Eliminates system bell errors on osx.
Prepended an 'if' to remove error bell on osx systems.
2013-07-25 11:39:21 -07:00