Open romkatv opened 5 years ago
To reproduce:
docker run -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -e TERM=$TERM -it --rm ubuntu bash -uexc ' apt update && apt install -y zsh git git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k echo " hash -d p9k=~/powerlevel9k POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=() POWERLEVEL9K_SHORTEN_STRATEGY=default POWERLEVEL9K_SHORTEN_DIR_LENGTH=9999 source ~/powerlevel9k/powerlevel9k.zsh-theme" >~/.zshrc cd ~/powerlevel9k exec zsh'
The prompt will display ~p9k, the same as ${(%):-%~}. Now type unset POWERLEVEL9K_SHORTEN_DIR_LENGTH. The prompt changes to ~/powerlevel9k.
~p9k
${(%):-%~}
unset POWERLEVEL9K_SHORTEN_DIR_LENGTH
~/powerlevel9k
This is unexpected. In both cases there was no shortening of the directory, so the prompt should be identical.
More generally, unless POWERLEVEL9K_DIR_PATH_ABSOLUTE is set to true, the first segment in dir segment should be the same as in ${(%):-%~}.
POWERLEVEL9K_DIR_PATH_ABSOLUTE
true
dir
To reproduce:
The prompt will display
~p9k
, the same as${(%):-%~}
. Now typeunset POWERLEVEL9K_SHORTEN_DIR_LENGTH
. The prompt changes to~/powerlevel9k
.This is unexpected. In both cases there was no shortening of the directory, so the prompt should be identical.
More generally, unless
POWERLEVEL9K_DIR_PATH_ABSOLUTE
is set totrue
, the first segment indir
segment should be the same as in${(%):-%~}
.