zsh-users/zsh-syntax-highlighting — pull request #152 by jimmijj (2014-09-26 21:31:29+00:00)
Title: colors for files, command_prefix + more minor modification

I've added a few things, mainly to highlighters/main/main-highlighter.zsh:

1. Highlighting for files based of LS_COLORS environment variable with the following features:
a) does not interfere with path style
b) both 8 and 256 color terminal are supported
c) attributes (ex, ln, st...) and extension of file are taken into account
d) file prefix is recognized and properly colored too
e) possibility to edit filename in the middle of the line without loosing colors
f) user can override color for one particular file type or all at once in .zshrc

2. command_prefix
This should solve (at least partially) issue #148. The problem is that if path_approx style is enabled and user run command in $HOME directory then one of many dot-files in this folder match almost all commands. To solve this function check_command should be run *before* check_path. By default I set this style to the same as command style, this probably what user is expecting.

3. Changed ${#BUFFER} -> ${#LBUFFER} in path_check
This is minor improvement to guarantee that path prefix can be with colors even if edit is made in the middle of the line.

4. missing separators &|, |& and &!
It seems obvious to include all command separators to the list, but for some reason these three were not there. I see this also in user 'm0vie' commit, but is was not merged to main tree so far.

Additionally I've described new file-highlighting under ./highlighters/main/README.md and added small screenshot to ./README.md to give new users a hint what to expect from zsh-syntax-highlighting package.

Comments and questions are welcome.