powerlevel10k SHOW_ON_COMMAND integration #163
Replies: 2 comments 2 replies
-
|
For a first check, does adding |
Beta Was this translation helpful? Give feedback.
-
|
Got around to looking at the p10k feature! To do this I believe you'd have to fork p10k. You'd add an elif to the For the work: might be able to check each of the four abbreviation arrays (e.g. Could get recursive, iterating over every word in the expansion. That might get slow. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
powerlevel10k has a neat feature where it conditionally displays certain prompt segments (e.g. kubectl status) only when a related command (e.g.
kubectl) is being typed. Critically, this feature is smart enough to know that ifalias kc=kubectl, thenkcshould also trigger the kubectl segment.I'm wondering, is there a way for zsh-abbr to hook into this pre-expansion? As things stand, if I have
abbr k=kubectl, and I typek, p10k doesn't notice, becausekis not yet expanded; I'd have to typek, ork<enter>, or similar to expandktokubectl, at which point p10k notices.This is a super minor, niche case, but I'm curious.
Beta Was this translation helpful? Give feedback.
All reactions