Use case for tea --provides
#331
Replies: 2 comments
-
Love it 🫡
Caching the provides data based on the timestamp of the pantry seems like a good start to optimizing this. In general I foresee a need to crunch the pantry data into an sqlite blob or something like that. We must be fast. |
Beta Was this translation helpful? Give feedback.
-
This worked wonderfully and thank you as it fell really off to not have tea linked packages highlighted. I wonder if it would be possible to get your fork merged upstream or otherwise maintain our own version of the plugin adatped for tea so it's easy to install that instead of the general highlight plugin? Wasn't so bad tho I only had to uninstall the original one and clone your repo instead of Thanks again for sharing ;) |
Beta Was this translation helpful? Give feedback.
-
Now that tea v0.20 adds the
--provides
mode, I wanted to test out how viable it really is.I use
oh-my-zsh
withzsh-syntax-highlighting
as my daily driver, and I was getting sick of commands highlighting as invalid even when provided bytea
.So I made a fork of the the syntax-highlighting repo that adds shaky tea support. You can add it as a plugin here if you're interested.
There is a significant speed drop however. In the area of around 100ms delay when typing commands. The delay only applies for the original command however. All flags have no delay when typed.
Note that in order for the plugin to apply, the
tea
magic script in your.zshrc
needs to be slightly modified.From
To
Now, whenever you type in a command that
tea
provides, it'll be automatically colored as such instead of being highlighted as invalid.Beta Was this translation helpful? Give feedback.
All reactions