powerlevel9k
powerlevel9k copied to clipboard
POWERLEVEL9K_SHORTEN_STRATEGY=truncate_with_package_name doesn't work
This is on master.
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 jq
git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k
cd ~/powerlevel9k
echo "{\"name\":\"x\"}" >package.json
echo "
POWERLEVEL9K_SHORTEN_STRATEGY=truncate_with_package_name
source ~/powerlevel9k/powerlevel9k.zsh-theme" >~/.zshrc
exec zsh'
Expected: the current directory in the prompt is displayed as x.
Actual: the current directory in the prompt is displayed as ~/powerlevel9k and there is an error message: truncatePath:4: bad math expression: illegal character: \.