zsh-syntax-highlighting

Rating: 
5
Your rating: None Average: 5 (1 vote)
Fish like syntax highlighting for Zsh
1.) To enable add this line at the end of ~/.zshrc:
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
2.) Then 'source ~/.zshrc' or restart terminal app and it will be enabled.
Screenshots: 
Changelog: 

Changes in version 0.6.0

This is a stable release, featuring bugfixes and minor improvements.
Performance improvements:

(none)
Added highlighting of:

    The isearch and suffix $zle_highlight settings. (79e4d3d12405, 15db71abd0cc, b56ee542d619; requires zsh 5.3 for $ISEARCHMATCH_ACTIVE / $SUFFIX_ACTIVE support)

    Possible history expansions in double-quoted strings. (76ea9e1df316)

    Mismatched if/then/elif/else/fi. (73cb83270262)

Fixed highlighting of:

    A comment line followed by a non-comment line. (#385, 9396ad5c5f9c)

    An unquoted $* (expands to the positional parameters). (237f89ad629f)

    history-incremental-pattern-search-backward under zsh 5.3.1. (#407, #415, 462779629a0c)

API changes (for highlighter authors):

(none)
Developer-visible changes:

    tests: Set the ALIAS_FUNC_DEF option for zsh 5.4 compatibility. (9523d6d49cb3)

Other changes:

    docs: Added before/after screenshots. (cd9ec14a65ec..b7e277106b49)

    docs: Link Fedora package. (3d74aa47e4a7, 5feed23962df)

    docs: Link FreeBSD port. (626c034c68d7)

    docs: Link OpenSUSE Build Service packages (#419, dea1fedc7358)

    Prevent user-defined aliases from taking effect in z-sy-h's own code. (#390, 2dce602727d7, 8d5afe47f774; and #392, #395, b8fa1b9dc954)

    docs: Update zplug installation instructions. (#399, 4f49c4a35f17)

    Improve "unhandled ZLE widget 'foo'" error message. (#409, be083d7f3710)

    Fix printing of "failed loading highlighters" error message. (#426, ad522a091429)

Comments

Universebenzene's picture

When sourcing the .zsh script, it says: /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh:35: no such file or directory: /usr/share/zsh/plugins/zsh-syntax-highlighting/.version

I checked and found that the .version file and the .revision-hash file are missing. Is this my own problem?

shellkr's picture

I updated to 0.6.0... perhaps this will remedy your issue. I did also see if it they are installed and they should be. Let me know if they are still missing. They have just a single line and is easy to manually make.

shellkr's picture

I am guessing it is. I checked quickly and they are there for me. Did you remember to do 'ls -la' so that you see hidden files?

Universebenzene's picture

Of course I did use the -a parameter with ls... And if they were not missing, it wouldn't have errors like that. Finally I have to copy these files from my PC and now it's working...

shellkr's picture

I put through another update. It should fix the issue. I have double checked and both files are changed/corrected after install.

Thanks for reporting it! ;)

Universebenzene's picture

Yeah, it contains those files now. Thanks for the fixing! :)