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.9k stars 1.32k forks source link

Highlighter for mysql #785

Open sparcbr opened 3 years ago

sparcbr commented 3 years ago

Does anyone already managed to make a SQL highlighter work with zsh-syntax-highlighting ?

I plan to make it work when calling commands like mysql -e 'SELECT ...', mycli and also for my sql scripts like: sql "SELECT ..."

Any tips on or similar commands that call custom highlighters are welcome..

Thanks!

danielshahaf commented 3 years ago

I'm not aware of prior art in this area, though there are related tools, such as pygmentize and edit-command-line.

I guess the first design decision is whether to implement an SQL parser in zsh or to shell out to an existing, external parser.

What about SQL scripts in heredocs in interactive shells (at the $PS2 prompt)?