zsh-syntax-highlighting
zsh-syntax-highlighting copied to clipboard
Fish shell like syntax highlighting for Zsh.
I noticed that variables are highlighted only in double quotes.  What about non-quoted ones?
It would be nice for — ```zsh set -u unset foo echo "$foo" ``` — to highlight the `$foo` as an error (= in red), since that line would fail...

See log messages for details. Any concerns with the changed behaviour (see the updated test expectations)?
@phy1729 This could benefit from the arithmetic expressions highlighter you wrote yesterday :)
https://github.com/zsh-users/zsh-syntax-highlighting/blob/5e4b446dee770a811ffb6c19ee41f624895e56da/highlighters/main/main-highlighter.zsh#L275-L300 As [zshexpn(1)](http://zsh.sourceforge.net/Doc/Release/Expansion.html#Expansion) specifies, alias expansion precedes parameter expansion which precedes tilde expansion. However, the code implements them in a different order (e.g., tilde expansion is performed before alias expansion).
This is i343-precommands-v2, but rebased, and with an extra commit about ${foo} parameter expansions. Related to #264, #328, #343, #168, #365 (see log messages and added comments).
After 0.8.0 is released, ask Sebastian to update the comparison screenshots on https://github.com/zdharma/fast-syntax-highlighting#features: several of the features missing there have been implemented.
`$foo:hey` should highlight `$foo:h` as a parameter expansion. - both within and without quotes - modifiers can be chained, `$foo:h:h:t`
Re #491, something like this? It does incorrectly highlight `-n` as path in a case statement like ``` case a in --) foo;; a) cat -n .zshrc;; esac ``` (Should...