Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
POWERLEVEL9K_CUSTOM_HOST_NAME="echo Docker-MASTER"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_host_name dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator time history battery)
I can't get "Docker-MASTER" to appear on my prompt.
A little bit about my environment:
I have a mac and am running a docker container running ubuntu inside it. I have the same powerlevel9k configs in both my local mac and docker. Everything works as expected on the mac, but the ubuntu docker prompt does not show my custom command.
Also, I am running powerlevel10k. Not sure if this is something specific to that.
I think I've narrowed down the problem to the function prompt_custom in p10k.sh.
The line local -a cmd=("${(@Q)${(z)${(P):-POWERLEVEL9K_CUSTOM_${segment_name}}}}") returns POWERLEVEL9K_CUSTOM_HOST_NAME on my ubuntu where as it returns echo LOCAL on my mac.
Please let me know if there's any other information I can include. Thanks for the help!
Describe Your Issue
Custom functions in Ubuntu are not working
Here is my zshrc:
I can't get "Docker-MASTER" to appear on my prompt.
A little bit about my environment: I have a mac and am running a docker container running ubuntu inside it. I have the same powerlevel9k configs in both my local mac and docker. Everything works as expected on the mac, but the ubuntu docker prompt does not show my custom command.
Also, I am running powerlevel10k. Not sure if this is something specific to that.
Screenshots: https://prnt.sc/o88azs https://prnt.sc/o88b4u
Have you tried to debug or fix it?
I think I've narrowed down the problem to the function
prompt_custom
in p10k.sh.The line
local -a cmd=("${(@Q)${(z)${(P):-POWERLEVEL9K_CUSTOM_${segment_name}}}}")
returns POWERLEVEL9K_CUSTOM_HOST_NAME on my ubuntu where as it returnsecho LOCAL
on my mac.Please let me know if there's any other information I can include. Thanks for the help!