-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh promt for custom segment #609
Comments
Please try replacing your function prompt_my_docker_compose() {
(( $+commands[docker-compose] )) || return
async_job docker_compose_status parse_compose_data $PWD
local content='$MY_P9K_DOCKER_OUTPUT[$PWD]'
p10k segment -i $'\uf308' -f blue -e -c $content -t $content
} I've added I've also replaced |
Segment now works, thanks! |
Roang-zero1
pushed a commit
to Roang-zero1/dotfiles
that referenced
this issue
Apr 4, 2020
See romkatv/powerlevel10k#609 for details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've created a custom segment that asynchronously loads the current docker-compose status.
The segment works as expected with the cached data, but I am unable to refresh the promt.
I followed the suggestions in #503 and added
zle reset-promt
andzle -R
, but the promt segment does not update.If I output data in the callback before the
zle
commands it vanishes, so I think the reload works but I am missing something to make the prompt segment update.The full
.zshrc
and.p10k.zsh
can be found at Roang-zero1/dotfiles@85aea74.PS: What way would be the default way to provide default values for variables (e.g. colors for container status)
The text was updated successfully, but these errors were encountered: