Closed tmpm697 closed 4 years ago
Please post the output of the following command:
typeset -pm 'POWERLEVEL9K_*|ZSH_VERSION'
The output:
typeset POWERLEVEL9K_CONFIG_FILE=/home/user/.config/zsh/.p10k.zsh
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_FOREGROUND=''
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
typeset POWERLEVEL9K_SHORTEN_DELIMITER=''
typeset POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
typeset POWERLEVEL9K_CONTEXT_TEMPLATE=:
typeset POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=''
typeset POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
typeset -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( time context vcs dir prompt_char )
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_CONTENT_EXPANSION='%#'
typeset POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
typeset POWERLEVEL9K_VCS_CLEAN_FOREGROUND=2
typeset POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=''
typeset POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
typeset POWERLEVEL9K_RIGHT_LEFT_WHITESPACE=''
typeset POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_FOREGROUND=''
typeset POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
typeset -a POWERLEVEL9K_KUBECONTEXT_CLASSES=( '*' DEFAULT )
typeset ZSH_VERSION=5.8
typeset POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi'
typeset POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
typeset POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=2
typeset POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_FOREGROUND=''
typeset POWERLEVEL9K_TIME_FOREGROUND=''
typeset POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=5
typeset POWERLEVEL9K_VCS_BRANCH_ICON=''
typeset POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR=''
typeset POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=1
typeset POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=3
typeset POWERLEVEL9K_STATUS_OK=false
typeset POWERLEVEL9K_TIME_FORMAT='[%D{%I:%M}] '
typeset POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2
typeset POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION=err
typeset POWERLEVEL9K_DIR_MAX_LENGTH=0
typeset POWERLEVEL9K_RULER_CHAR=-
typeset -a POWERLEVEL9K_VCS_BACKENDS=( git )
typeset POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_FOREGROUND=''
typeset POWERLEVEL9K_DIR_ANCHOR_BOLD=false
typeset POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
typeset POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=4
typeset POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
typeset POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset POWERLEVEL9K_CONTEXT_REMOTE_TEMPLATE=:
typeset POWERLEVEL9K_BACKGROUND=''
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_STATUS_ERROR=false
typeset POWERLEVEL9K_DIR_FOREGROUND=''
typeset POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
typeset POWERLEVEL9K_TRANSIENT_PROMPT=off
typeset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito'
typeset POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
typeset POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=''
typeset POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=''
typeset POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION=ok
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR=''
typeset POWERLEVEL9K_SHORTEN_FOLDER_MARKER='(.bzr|.citc|.git|.hg|.node-version|.python-version|.go-version|.ruby-version|.lua-version|.java-version|.perl-version|.php-version|.tool-version|.shorten_folder_marker|.svn|.terraform|CVS|Cargo.toml|composer.json|go.mod|package.json|stack.yaml)'
typeset POWERLEVEL9K_CONTEXT_REMOTE_SUDO_TEMPLATE=:
typeset POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=''
typeset POWERLEVEL9K_LEFT_RIGHT_WHITESPACE=''
typeset POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=''
typeset POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=''
typeset POWERLEVEL9K_ICON_PADDING=none
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_FOREGROUND=''
typeset POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
typeset POWERLEVEL9K_DISABLE_HOT_RELOAD=true
typeset POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=1
typeset POWERLEVEL9K_DIR_HYPERLINK=false
typeset POWERLEVEL9K_LEFT_LEFT_WHITESPACE=''
typeset POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM=-1
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_FOREGROUND=''
typeset POWERLEVEL9K_VCS_STAGED_MAX_NUM=-1
typeset POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=''
typeset POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=''
typeset POWERLEVEL9K_SHOW_RULER=false
typeset -a POWERLEVEL9K_TERRAFORM_CLASSES=( '*' DEFAULT )
typeset -a POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( )
typeset POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
typeset POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM=-1
typeset POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION=''
typeset POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
typeset POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE=:
typeset POWERLEVEL9K_RIGHT_RIGHT_WHITESPACE=''
typeset POWERLEVEL9K_STATUS_ERROR_FOREGROUND=1
typeset POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_CONTENT_EXPANSION='%#'
typeset POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION=''
typeset POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=''
typeset POWERLEVEL9K_STATUS_ERROR_PIPE=true
typeset POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
typeset POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM=-1
typeset POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION=ok
typeset POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_FOREGROUND=''
typeset POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM=-1
typeset POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
typeset POWERLEVEL9K_STATUS_OK_PIPE=true
typeset POWERLEVEL9K_MODE=ascii
typeset POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM=-1
typeset POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
typeset POWERLEVEL9K_CONTEXT_REMOTE_SUDO_FOREGROUND=''
typeset POWERLEVEL9K_RULER_FOREGROUND=7
typeset POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
typeset POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION=err
typeset POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=3
typeset POWERLEVEL9K_STATUS_OK_FOREGROUND=2
typeset POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION=''
typeset POWERLEVEL9K_CONTEXT_FOREGROUND=''
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_FOREGROUND=''
typeset POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
typeset -a POWERLEVEL9K_AWS_CLASSES=( '*' DEFAULT )
typeset POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
typeset POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=''
typeset POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=2
typeset POWERLEVEL9K_STATUS_EXTENDED_STATES=true
typeset POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_CONTENT_EXPANSION=''
typeset POWERLEVEL9K_CONTEXT_REMOTE_FOREGROUND=''
typeset POWERLEVEL9K_ICON_BEFORE_CONTENT=false
typeset POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=''
!w
is shown when your current directory is not writable. You've enabled it with this parameter:
typeset POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
If you don't want it, remove this parameter.
This is documented in your ~/.p10k.zsh
: https://github.com/romkatv/powerlevel10k/blob/6998d06a9168805a89b78ce403b70fac278d8454/config/p10k-lean.zsh#L265-L271
I tried to use
%#
as last character of left prompt (I use only left one) as in traditional prompt,%
when normal user,#
when root user.I set
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='%#'
, result as expected when we under folder that current user's the owner:When I under folder that user's not the owner, it appear as
!w%
like:How can I have
%
when uses as a normal user and if I use prompt as root it will has#
?