Closed papanito closed 4 years ago
What happens if you close your terminal and start it again?
The issue happens when I navigate / open a directory which contains a git repo. Basically I open a terminal, then do e.g. cd ~/Workspace/mygitrepo
the error happens
What happens if you close your terminal and start it again?
Could you answer this?
An addition, please post the output of the following command:
typeset -m 'POWERLEVEL9K_*|ZSH_VERSION'
Same when I close and open a new terminal, error always happens on a git directory
❯ typeset -m 'POWERLEVEL9K_*|ZSH_VERSION' ─╯
POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_FOREGROUND=76
POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_CONTENT_EXPANSION=Ⅴ
POWERLEVEL9K_JENV_SOURCES=( shell local global )
POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
POWERLEVEL9K_SHORTEN_DELIMITER=''
POWERLEVEL9K_RVM_SHOW_PREFIX=false
POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
POWERLEVEL9K_CONTEXT_TEMPLATE=%n@%m
POWERLEVEL9K_OS_ICON_FOREGROUND=232
POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3
POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255
POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND=2
POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_PYENV_SOURCES=( shell local global )
POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( os_icon dir vcs newline prompt_char )
POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_CONTENT_EXPANSION=❯
POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( '*' DEFAULT )
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
POWERLEVEL9K_BATTERY_VERBOSE=false
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_FOREGROUND=196
POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0
POWERLEVEL9K_RVM_SHOW_GEMSET=false
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
POWERLEVEL9K_KUBECONTEXT_CLASSES=( '*' DEFAULT )
ZSH_VERSION=5.7.1
POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
POWERLEVEL9K_CONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION=''
POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}'
POWERLEVEL9K_NODEENV_LEFT_DELIMITER=''
POWERLEVEL9K_NORDVPN_CONNECTING_VISUAL_IDENTIFIER_EXPANSION=''
POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_FOREGROUND=76
POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=2
POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false
POWERLEVEL9K_VI_INSERT_MODE_STRING=''
POWERLEVEL9K_VCS_BRANCH_ICON=' '
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1'
POWERLEVEL9K_PROMPT_CHAR_LEFT_LEFT_WHITESPACE=''
POWERLEVEL9K_STATUS_OK=false
POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION=✘
POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3
POWERLEVEL9K_NORDVPN_DISCONNECTING_VISUAL_IDENTIFIER_EXPANSION=''
POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242
POWERLEVEL9K_CONTEXT_SUDO_CONTENT_EXPANSION=''
POWERLEVEL9K_DIR_MAX_LENGTH=80
POWERLEVEL9K_VCS_BACKENDS=( git )
POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_FOREGROUND=76
POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
POWERLEVEL9K_DIR_ANCHOR_BOLD=true
POWERLEVEL9K_NORDVPN_DISCONNECTED_VISUAL_IDENTIFIER_EXPANSION=''
POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
POWERLEVEL9K_LUAENV_SOURCES=( shell local global )
POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_DIR_SHOW_WRITABLE=true
POWERLEVEL9K_CONTEXT_REMOTE_SUDO_BACKGROUND=0
POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=''
POWERLEVEL9K_INSTANT_PROMPT=verbose
POWERLEVEL9K_CONTEXT_REMOTE_TEMPLATE=%n@%m
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_CONTENT_EXPANSION=Ⅴ
POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
POWERLEVEL9K_STATUS_ERROR=false
POWERLEVEL9K_DIR_FOREGROUND=254
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=─
POWERLEVEL9K_CONTEXT_BACKGROUND=0
POWERLEVEL9K_TRANSIENT_PROMPT=off
POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=%242F─╮
POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=%242F─┤
POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_NORDVPN_DISCONNECTED_CONTENT_EXPANSION=''
POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION=✔
POWERLEVEL9K_CONTEXT_SUDO_VISUAL_IDENTIFIER_EXPANSION=''
POWERLEVEL9K_CONTEXT_DEFAULT_CONTENT_EXPANSION=''
POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_CONTENT_EXPANSION=❮
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3'
POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
POWERLEVEL9K_SHORTEN_FOLDER_MARKER='(.bzr|.citc|.git|.hg|.node-version|.python-version|.ruby-version|.shorten_folder_marker|.svn|.terraform|CVS|Cargo.toml|composer.json|go.mod|package.json)'
POWERLEVEL9K_CONTEXT_REMOTE_SUDO_TEMPLATE=%n@%m
POWERLEVEL9K_CONTEXT_REMOTE_BACKGROUND=0
POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER=''
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=''
POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=''
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_CONTENT_EXPANSION=▶
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_FOREGROUND=196
POWERLEVEL9K_NORDVPN_CONNECTING_CONTENT_EXPANSION=''
POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
POWERLEVEL9K_RBENV_SOURCES=( shell local global )
POWERLEVEL9K_OS_ICON_BACKGROUND=7
POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER=''
POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
POWERLEVEL9K_DISABLE_HOT_RELOAD=true
POWERLEVEL9K_DIR_HYPERLINK=false
POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM=-1
POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_FOREGROUND=76
POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
POWERLEVEL9K_VCS_STAGED_MAX_NUM=-1
POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=%242F─╯
POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*'
POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( status command_execution_time background_jobs direnv virtualenv anaconda pyenv goenv nodenv nvm nodeenv rbenv rvm fvm luaenv jenv plenv kubecontext terraform aws context nordvpn ranger nnn vim_shell vi_mode todo time newline )
POWERLEVEL9K_NODEENV_RIGHT_DELIMITER=''
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_PLENV_SOURCES=( shell local global )
POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM=-1
POWERLEVEL9K_PROMPT_CHAR_LEFT_RIGHT_WHITESPACE=''
POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION=✘
POWERLEVEL9K_ANACONDA_LEFT_DELIMITER=''
POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE=%n@%m
POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_CONTENT_EXPANSION=❯
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=''
POWERLEVEL9K_STATUS_ERROR_PIPE=true
POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM=-1
POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION=✔
POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2'
POWERLEVEL9K_BATTERY_STAGES=
POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=''
POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3
POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER=''
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_FOREGROUND=196
POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2
POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM=-1
POWERLEVEL9K_VI_MODE_FOREGROUND=0
POWERLEVEL9K_STATUS_OK_PIPE=true
POWERLEVEL9K_MODE=nerdfont-complete
POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM=-1
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=''
POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
POWERLEVEL9K_CONTEXT_REMOTE_SUDO_FOREGROUND=3
POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION=✘
POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
POWERLEVEL9K_LOAD_WHICH=5
POWERLEVEL9K_CONTEXT_FOREGROUND=3
POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_CONTENT_EXPANSION=❮
POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_FOREGROUND=196
POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
POWERLEVEL9K_AWS_CLASSES=( '*' DEFAULT )
POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
POWERLEVEL9K_STATUS_EXTENDED_STATES=true
POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_CONTENT_EXPANSION=▶
POWERLEVEL9K_CONTEXT_REMOTE_FOREGROUND=3
POWERLEVEL9K_NORDVPN_DISCONNECTING_CONTENT_EXPANSION=''
POWERLEVEL9K_ICON_BEFORE_CONTENT=''
POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250
POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}'
Where did all these POWERLEVEL9K_*
parameters come from? Your ~/.zshrc
doesn't seem to define them.
Edit: Is it possible that you haven't posted your whole config?
Yep last line was missing, stuff seems defined in ~/.p10k.zsh
Please attach your complete ~/.zshrc
and ~/.p10k.zsh
(you can drag and drop files to the edit box on github). Also post the output of the following command:
functions my_git_formatter || echo null
Here are the files:
functions my_git_formatter || echo null
gives nothing in return
gives nothing in return
Nothing? Doesn't even print "null"?
Can you reproduce this problem if you comment out everything in your zshrc except for powerlevel10k things? Basically, leave just this:
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZSH=~/.oh-my-zsh
ZSH_THEME=powerlevel10k/powerlevel10k
plugins=()
source $ZSH/oh-my-zsh.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
Nothing? Doesn't even print "null"? Nope just black terminal Can you reproduce this problem if you comment out everything in your zshrc except for powerlevel10k things?
Nope, issue disappears with the config you provided.
Will check further what may cause the issue...
Will check further what may cause the issue...
Try enabling things one by one and seeing what causes the issue to reappear.
Yep will do so. Keep you updated and many thanks for your support. And I really love your theme
So I've enabled stuff step-wise and this is my final .zshrc
and no issues so far
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Created by newuser for 5.2
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**'
zstyle :compinstall filename '/home/aedu/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob notify hist_ignore_all_dups
bindkey -e
# End of lines configured by zsh-newuser-install
export LANG=en_US.UTF-8
export VISUAL=vi
export PATH=/home/aedu/bin:/home/aedu/bin/go/bin:/home/aedu/.gem/ruby/2.5.0/bin:/opt/atlassian-plugin-sdk/bin:/opt/flutter/bin:$PATH
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
ansible
gnu-utils
git
rake
ruby
go
gradle
helm
python
ssh-agent
tmux
kubectl
history-substring-search
heroku
)
ZSH=~/.oh-my-zsh
ZSH_THEME=powerlevel10k/powerlevel10k
source $ZSH/oh-my-zsh.sh
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases ; fi
if [ -f ~/.bash_exports ]; then . ~/.bash_exports ; fi
if [ -f ~/.bash_functions ]; then . ~/.bash_functions ; fi
if [ -f ~/.azure_completion ]; then . ~/.azure_completion ; fi
setopt COMPLETE_ALIASES
# https://gnunn1.github.io/tilix-web/manual/vteconfig/
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
# https://github.com/zsh-users/zsh-history-substring-search
#export zsh_plugin_dir=/usr/share/oh-my-zsh/custom/plugins/
#source $zsh_plugin_dir/zsh_history_substring_search/zsh-syntax-highlighting.zsh
#source $zsh_plugin_dir/zsh_history_substring_search/zsh-history-substring-search.zsh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
As you can see it's pretty the same, however no problem until now...
As you can see it's pretty the same, however no problem until now...
What about travis? Have you tried enabling it?
[ -f /home/aedu/.travis/travis.sh ] && source /home/aedu/.travis/travis.sh
Yes I did as well, had no impact.
Closing as irreproducible.
I had the same problem recently, and it turned out that I had a bug in an aliasing script which was sourced prior to sourcing p10k.zsh
. So if anyone stumbles upon this same issue, make sure that you are sourcing all this stuff first prior to your own stuff or avoid fancy aliasing scripts.
I had the same today, and @pleasemarkdarkly comment help me out ;)
I recently successfully installed the theme but as of a sudden when opening a new terminal it tells me
I've installed it as follows
my config