zsh-users / zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.
github.com/zsh-users/zsh-syntax-highlighting
BSD 3-Clause "New" or "Revised" License
19.55k stars 1.32k forks source link

Using zsh in ubuntu #904

Open Reverendyz opened 1 year ago

Reverendyz commented 1 year ago

i am trying to follow strictly this INSTALL.md and use this syntax highlighting but am always getting:

zsh-syntax-highlighting: error: $region_highlight is not defined
zsh-syntax-highlighting: (Check whether zsh-syntax-highlighting was installed according to the instructions.)

I tryied almost every solution on google. Anyone's getting the same error?

Reverendyz commented 1 year ago

For any reason, after this error, the syntax highlighting worked ¯_(ツ)_/¯

danielshahaf commented 1 year ago

INSTALL.md lists several different ways to install on Ubuntu. How exactly did you install?

At any rate, that error message means _zsh_highlight was invoked as a plain function rather than as a zle widget. That's not supposed to happen under any installation method. Easiest way to debug is to print -r -- $funcstack > /dev/tty at the top of _zsh_highlight.