Closed rockyzhang24 closed 4 years ago
Please add the following lines at the very top of ~/.zshrc
:
PS1='%m%# '
RPS1=
return
Can you still reproduce the weird %
?
Closing due to inactivity. If you are still affected by this issue, please reopen and provide the information I've asked for.
Hi @romkatv I also have this same issue.
It doesn't appear on the tmux "tabs/windows" but I can get it on gnome-terminal's tabs.
Adding following on the top of my .zshrc doesn't show %
.
PS1='%m%# '
RPS1=
return
Also, the command repeats itself like following
Thank you.
@aasutossh What is the output of the following command?
() {
emulate -L zsh -o xtrace
locale -a
locale
zmodload zsh/langinfo
echo -E - $langinfo[CODESET]
typeset -pm 'ZSH_VERSION'
echo '\u276F'
}
Outputs following:
+(anon):2> locale -a
ar_AE.utf8
ar_BH.utf8
ar_DZ.utf8
ar_EG.utf8
ar_IN
ar_IN.utf8
ar_IQ.utf8
ar_JO.utf8
ar_KW.utf8
ar_LB.utf8
ar_LY.utf8
ar_MA.utf8
ar_OM.utf8
ar_QA.utf8
ar_SA.utf8
ar_SD.utf8
ar_SS
ar_SS.utf8
ar_SY.utf8
ar_TN.utf8
ar_YE.utf8
C
C.UTF-8
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_IT.utf8
de_LI.utf8
de_LU.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
es_AR.utf8
es_BO.utf8
es_CL.utf8
es_CO.utf8
es_CR.utf8
es_CU
es_CU.utf8
es_DO.utf8
es_EC.utf8
es_ES.utf8
es_GT.utf8
es_HN.utf8
es_MX.utf8
es_NI.utf8
es_PA.utf8
es_PE.utf8
es_PR.utf8
es_PY.utf8
es_SV.utf8
es_US.utf8
es_UY.utf8
es_VE.utf8
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
fr_LU.utf8
it_CH.utf8
it_IT.utf8
ja_JP.utf8
POSIX
pt_BR.utf8
pt_PT.utf8
ru_RU.utf8
ru_UA.utf8
zh_CN.utf8
zh_HK.utf8
zh_SG.utf8
zh_TW.utf8
+(anon):3> locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
+(anon):4> zmodload zsh/langinfo
+(anon):5> echo -E - UTF-8
UTF-8
+(anon):6> typeset -pm ZSH_VERSION
typeset -g ZSH_VERSION=5.7.1
+(anon):7> echo '\u276F'
❯
Also, the command repeats itself like following
This looks totally broken. I'd like to reproduce this. Please post the output of the following command from the terminal where this issue manifests itself:
() {
emulate -L zsh
typeset -pm 'POWERLEVEL9K_*|*TERM*'
uname -a
}
Also, please attach your zshrc.
The output of function:
()typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_FOREGROUND=76
typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIVIS_CONTENT_EXPANSION=Ⅴ
typeset -g -a POWERLEVEL9K_JENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208
typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
typeset -g -a POWERLEVEL9K_PHPENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=''
typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE=%n@%m
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232
typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
typeset -g POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND=2
typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
export COLORTERM=truecolor
typeset -g -a POWERLEVEL9K_PYENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_IP_BACKGROUND=4
typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP'
typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\%/%%}'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( os_icon dir vcs newline )
typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_CONTENT_EXPANSION=❯
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
typeset -g -a POWERLEVEL9K_GOENV_SOURCES=( shell local global )
typeset -g -a POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( '*' DEFAULT )
typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0BA'
typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0
typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1
typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0
typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIINS_FOREGROUND=196
typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0
typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
typeset -g -a POWERLEVEL9K_KUBECONTEXT_CLASSES=( '*' DEFAULT )
typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi'
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=''
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION=''
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}'
typeset -g POWERLEVEL9K_NODEENV_LEFT_DELIMITER=''
typeset -g POWERLEVEL9K_NORDVPN_CONNECTING_VISUAL_IDENTIFIER_EXPANSION=''
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_FOREGROUND=76
typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1
export GNOME_TERMINAL_SERVICE=:1.5659
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0
typeset -g POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=2
typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=''
typeset -g POWERLEVEL9K_VCS_PREFIX='on '
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=' '
typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0BD'
typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5
typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2
typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_LEFT_WHITESPACE=''
typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1
typeset -g POWERLEVEL9K_STATUS_OK=true
typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7
typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=''
typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION=✘
typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3
typeset -g POWERLEVEL9K_NORDVPN_DISCONNECTING_VISUAL_IDENTIFIER_EXPANSION=''
typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240
typeset -g POWERLEVEL9K_CONTEXT_SUDO_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
typeset -g -a POWERLEVEL9K_VCS_BACKENDS=( git )
typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
typeset -g ZSH_THEME_TERM_TITLE_IDLE='%n@%m: %~'
typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_FOREGROUND=76
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
typeset -g POWERLEVEL9K_NORDVPN_DISCONNECTED_VISUAL_IDENTIFIER_EXPANSION=''
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
typeset -g -a POWERLEVEL9K_LUAENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6
typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7
typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND=4
typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true
typeset -g POWERLEVEL9K_CONTEXT_REMOTE_SUDO_BACKGROUND=0
typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=''
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
typeset -g POWERLEVEL9K_CONTEXT_REMOTE_TEMPLATE=%n@%m
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_CONTENT_EXPANSION=Ⅴ
typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER// }'
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4
typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
typeset -g POWERLEVEL9K_STATUS_ERROR=true
typeset -g POWERLEVEL9K_DIR_FOREGROUND=254
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=─
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito'
typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0
typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0BA'
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=%240F─╮
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=%240F─┤
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_NORDVPN_DISCONNECTED_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0
typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5
typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION=✔
typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0
typeset -g POWERLEVEL9K_CONTEXT_SUDO_VISUAL_IDENTIFIER_EXPANSION=''
typeset -g -a POWERLEVEL9K_ASDF_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_CONTEXT_DEFAULT_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VICMD_CONTENT_EXPANSION=❮
typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0BD'
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
typeset -g ZSH_THEME_TERM_TAB_TITLE_IDLE='%15<..<%~%<<'
typeset -g 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 -g POWERLEVEL9K_CONTEXT_REMOTE_SUDO_TEMPLATE=%n@%m
typeset -g POWERLEVEL9K_CONTEXT_REMOTE_BACKGROUND=0
typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7
typeset -g POWERLEVEL9K_IP_FOREGROUND=0
typeset -g POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER=''
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=%240F╭─
typeset -g -a POWERLEVEL9K_NODENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=%240F├─
typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0BC'
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIOWR_CONTENT_EXPANSION=▶
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIVIS_FOREGROUND=196
typeset -g POWERLEVEL9K_NORDVPN_CONNECTING_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with '
typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
typeset -g -a POWERLEVEL9K_RBENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7
typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4
typeset -g POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER=''
typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0
typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
typeset -g POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM=-1
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_FOREGROUND=76
typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
typeset -g POWERLEVEL9K_VCS_STAGED_MAX_NUM=-1
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi'
typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=%240F─╯
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*'
typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1
typeset -g -a POWERLEVEL9K_TERRAFORM_CLASSES=( '*' DEFAULT )
typeset -g -a POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( status command_execution_time background_jobs direnv asdf virtualenv anaconda pyenv goenv nodenv nvm nodeenv rbenv rvm fvm luaenv jenv plenv phpenv haskell_stack kubecontext terraform aws aws_eb_env azure gcloud google_app_cred context nordvpn ranger nnn vim_shell midnight_commander nix_shell vi_mode todo timewarrior taskwarrior time newline )
typeset -g POWERLEVEL9K_NODEENV_RIGHT_DELIMITER=''
typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4
typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
typeset -g -a POWERLEVEL9K_PLENV_SOURCES=( shell local global )
typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0
typeset -g POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM=-1
typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_RIGHT_WHITESPACE=''
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION=✘
typeset -g POWERLEVEL9K_ANACONDA_LEFT_DELIMITER=''
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE=%n@%m
typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5
typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_VIINS_CONTENT_EXPANSION=❯
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=%240F╰─
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1
export GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/0c8a3171_8b8c_4db8_87c1_3cca7fe70d13
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
typeset -g POWERLEVEL9K_VCS_COMMITS_BEHIND_MAX_NUM=-1
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION=✔
typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0BA'
typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
typeset -g POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER=''
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_FOREGROUND=196
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM=-1
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took '
typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7
typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0
typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
typeset -g POWERLEVEL9K_MODE=nerdfont-complete
typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at '
typeset -g POWERLEVEL9K_VCS_COMMITS_AHEAD_MAX_NUM=-1
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=''
typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1
typeset -g POWERLEVEL9K_CONTEXT_REMOTE_SUDO_FOREGROUND=3
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
export TERM=tmux-256color
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION=✘
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0BC'
typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
typeset -g -a POWERLEVEL9K_HASKELL_STACK_SOURCES=( shell local )
typeset -g POWERLEVEL9K_LOAD_WHICH=5
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_CONTENT_EXPANSION=❮
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VICMD_FOREGROUND=196
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0BC'
typeset -g POWERLEVEL9K_TIME_PREFIX='at '
typeset -g -a POWERLEVEL9K_AWS_CLASSES=( '*' DEFAULT )
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_BACKGROUND=0
typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_VIOWR_CONTENT_EXPANSION=▶
typeset -g POWERLEVEL9K_CONTEXT_REMOTE_FOREGROUND=3
typeset -g POWERLEVEL9K_NORDVPN_DISCONNECTING_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=''
typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT// }'
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi'
Linux pop-os 5.3.0-7629-generic #31~1581628825~19.10~f90b7d5-Ubuntu SMP Fri Feb 14 19:56:45 UTC x86_64 x86_64 x86_64 GNU/Linux
I am using gnome-terminal
. gnome-terminal --version
:-> # GNOME Terminal 3.34.2 using VTE 0.58.2 +BIDI +GNUTLS
I am using pop!_OS 19.10.
Do you see this issue in other terminals?
I used alacritty but always with tmux. So I am not sure. Let me check and update this. Update: It's the same with alacritty too. The % sign and commands repeating on the next line.
Do you see this issue on other machines?
I don't have other machines.
Was it always broken or did it break at some point? When?
I think it was like this the whole time(with pk10(I was using bash before, moved to zsh for pk10)). I used everything with tmux, and inside tmux these didn't occur so I didn't care.
export TERM=tmux-256color
Seems like you are setting TERM
somewhere. It's almost always a bad idea to set TERM
. Please remove TERM
from zshrc
or wherever you set it.
And that's it.
The % is gone.
Repeating commands is gone.
Everybody tell me to set $TERM everywhere, in .tmux.conf
, in .vimrc
, in .bashrc
etc.
I set $TERM
to support colors in (neo)vim
inside tmux
.
Edit: Thank you so much.
You can double close the issue now.
I'm glad this has resolved the issue.
TERM
is supposed to be set by your terminal or terminal emulator. It's how it lets shell and other applications attached to the TTY know which protocol to use with the TTY. Sometimes a terminal or terminal emulator can understand several protocols and thus could potentially set TERM
to different values. If the default isn't what you want, you should change it in the settings of the terminal rather than downstream. If tmux
sets TERM
that you don't like, tell tmux
to use the value you want. Setting TERM
in rc files of applications that merely run in the terminal is almost always a bad idea. Thus, you shouldn't set TERM
in .bashrc
or .vimrc
.
Sorry for the late reply. Thank you @romkatv.
Later I googled it and I found that this percentage sign is actually a feature of zsh which is used to show "partial line", right? The reference link is https://superuser.com/a/645612/1145809
By reading this, I know that I can customize the symbol by setting $PROMPT_EOL_MARK, or removing it by unsetopt PROMPT_SP
, right?
Sorry for the late reply. Thank you @romkatv.
No worries. Could you answer the question I've asked in my first comment?
Later I googled it and I found that this percentage sign is actually a feature of zsh which is used to show "partial line", right?
Yes.
By reading this, I know that I can customize the symbol by setting $PROMPT_EOL_MARK
Indeed. My favorite is PROMPT_EOL_MARK='%K{red} %k'
, which you can put in ~/.zshrc
.
... or removing it by
unsetopt PROMPT_SP
, right?
This is a very bad idea. If you unset prompt_sp
, you won't see the complete output of some commands. Here's an example.
zsh -df
to get a clean shell without user configs.print -n hello
. Since the output of this command doesn't end with an empty line, you'll see the inverted %
. When you know the meaning of this sign, it's a very useful thing. Knowing that the output has an unfinished line is valuable.unsetopt prompt_sp
.print -n hello
again. You'll see no output whatsoever.Instead of print -n hello
it might have been cat /some/file
. If that file doesn't end in empty line, you will not see the last line.
Running zsh without prompt_sp
is so dangerous that Powerlevel10k won't even allow you to do it. If you unset this option, Powerlevel10k will immediately restore it.
The problem you are facing is either caused by misconfiguration (e.g., see above where @aasutossh had TERM=...
in ~/.zshrc
; you should never put TERM=...
in ~/.zshrc
), or a bug in terminal or powerlevel10k. To narrow it down I've asked you a question. This is likely not the only question you'll need to answer in the course of debugging this problem.
Thank you. I just put those three lines (your question) at the beginning of my zshrc and it seems that I cannot reproduce this "issue". Actually this issue happened occasionally when I open many terminal windows successively.
I bind a shortcut (cmd - enter) to open a terminal window. After I add those three lines and then I press these shortcut many times successively, I don't see that percentage symbol again. Probably it is because it returns immediately after setting the prompt, thus the execution of loading zshrc is very fast. Without putting your code, my zshrc is relatively longer so it needs more time to load. And instant mode of powerlevel10k make the prompt shows up immediately even before the finishing of loading zshrc, so the percentage sign appears.
What I mean is:
If I don't use powerlevel10k, when I open a terminal, the cursor bar will stay at the beginning, waiting for the loading of zshrc. After this, the prompt will appear. After using powerlevel10k, this waiting is interrupted by the instant mode, and the prompt appears immediately, so that percentage symbol appears to show this interruption, i.e, the partial line (first line where the cursor bar is lying there).
I don't know whether my understanding is correct. I am very glad you to "debug" this "issue". Just tell me the next assignment. Lol.
BTW, I attached my zshrc here (for testing your question, I removed powerlevel10k temporarily and I haven't added it back yet). It is very basic.
I just put those three lines (your question) at the beginning of my zshrc and it seems that I cannot reproduce this "issue".
Thanks, this is a useful bit of information. Let's stick to Alacritty in the following tests to have fewer moving parts.
When you see the percent sign when opening a new terminal, what is the output of the following command?
typeset -p LINES COLUMNS TERM
What does Cmd-Enter do? Does it create a new terminal always with the same size?
Please do the following:
~/.zshrc
:
PS1='%m%# '
RPS1=
return
Run the following command from zsh. It'll load your CPU to 100%. It can be stopped by pressing ENTER.
() {
emulate -L zsh -o err_return
setopt monitor no_bg_nice
local cpus
cpus=$(sysctl -n hw.ncpu)
[[ $cpus == <1-> ]]
{
repeat $cpus; do
{ while true; do; done } &
done
wait
} &!
{
print -r -- 'Forcing high CPU usage. Press ENTER to stop.'
read
} always {
kill -- -$! 2>/dev/null
}
}
Are you using the latest version of powerlevel10k? If not, can you reproduce the problem after updating to the latest version?
Please add the following lines at the very top of ~/.zshrc
:
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
source ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme
return
You might need to fix paths. Since you've posted an incomplete zshrc above (one that does not reproduce the issue we are debugging), I don't know the real paths.
Please add return
at the very top of ~/.zshrc
and post the output of zsh -xis <<<''
I have a similar issue, but it only occurs if I'm typing as the prompt is initializating. It still reproduces if I set PS1/RPS1 as above.
It still reproduces if I set PS1/RPS1 as above.
In other words, this reproduces if you disable powerlevel10k, right?
It still reproduces if I set PS1/RPS1 as above.
In other words, this reproduces if you disable powerlevel10k, right?
Yes, it's not isolated to powerlevel10k. In case anyone runs into this, it's a zsh thing.
Yes, it's not isolated to powerlevel10k. In case anyone runs into this, it's a zsh thing.
No, it's a terminal bug.
@romkatv I'm having the same issue and you are right, it seems a terminal bug because it happens only for termite
, not for xfce4-terminal
or gnome-terminal
Should I report this to termite
devs? Has it already been reported?
Thank you so much.
Should I report this to
termite
devs?
I don't have an opinion.
It has been already reported?
I don't know.
Hi,
When I open more windows of a terminal, sometimes there is a weird % appearing at the beginning. When I changed to other zsh themes (like ys or pure), it didn't appear.
I reproduced it on Alacritty, kitty terminal, iTerm2, and the macOS builtin Terminal.app.
My system is macOS 10.15.3.
Thank you.