Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 946 forks source link

dir leaks termcap sequences #1310

Closed romkatv closed 5 years ago

romkatv commented 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 '
  cd
  apt update && apt install -y zsh git
  git clone https://github.com/bhilburn/powerlevel9k.git
  mkdir "\033[2J\033[3J"
  cd "\033[2J\033[3J"
  echo "
    POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir)
    POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
    source ~/powerlevel9k/powerlevel9k.zsh-theme" >~/.zshrc
  exec zsh'

Expected:

expected

Actual:

actual

dritter commented 5 years ago

This is now fixed on next by merging #1329 and #1340