Our great sponsors
-
zsh-autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
fast-syntax-highlighting
Discontinued (Short name F-Sy-H). Syntax-highlighting for Zshell – fine granularity, number of features and multiple shipped themes.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I've been playing around with zsh's syntax highlighting to prettify my zsh setup and I was wondering whether it's possible to make the syntax highlighting aware of existing completion semantics of the particular command one is about to invoke at the moment of typing.
Maybe you can try https://github.com/marlonrichert/zsh-autocomplete
I should add that I also use zsh-completions, which fixes the issue with unknown tokens from zsh-syntax-highlighting in all but rare cases for me.
I use https://github.com/zdharma/fast-syntax-highlighting which highlights git --version differently than git --asdf. AFAIK it uses the completions to "know" what options are valid.
Alright. So it doesn't work for every command but for some the plugin is treating specifically. But then there is this hack https://github.com/Valodim/zsh-capture-completion which captures completion values. So maybe this could be used to generate more functions.