Powerlevel10k instant prompt #133
-
I use Powerlevel10k and for instant prompt I copied and pasted this from it's website. It works fine no issues. I wondering if there's a more "zsh-snapish" way of achieving the same result? Somthing like
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No, not really. P10k generates that file itself and, apparently, gives no guarantee that the file will be there at any given point in time. You could refactor the code a little, though: () { [[ -r $1 ]] && source $1 } ${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-$USERNAME.zsh |
Beta Was this translation helpful? Give feedback.
-
In case anyone else stumbles upon this, I've found a 'solution' for this which both ensures source ~/.znap/zsh-snap/znap.zsh
run-all
your-noisy
commands-here
() { [[ -r $1 ]] && source $1 } ${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${USERNAME}.zsh
znap command
znap command
other-things
# put / source your p10k config here
## This should be on the last line
znap source romkatv/powerlevel10k powerlevel10k.zsh-theme This ensures that the instant prompt is sourced early on, and then hands over to znap to load the theme via Replacing the For my actual |
Beta Was this translation helpful? Give feedback.
No, not really. P10k generates that file itself and, apparently, gives no guarantee that the file will be there at any given point in time.
You could refactor the code a little, though: