1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 05:30:06 +00:00

work around a bug in ohmyzsh (#2152)

The bug was introduced here: 3dd83a22a1

This causes Oh My Zsh to print \r to the terminal.
This commit is contained in:
Roman Perepelitsa 2023-01-11 21:52:12 +01:00
parent 35165798a8
commit 1a4b01c232

View file

@ -6584,7 +6584,7 @@ function _p9k_clear_instant_prompt() {
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
# Visual Studio Code prints this garbage.
unexpected=${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}
unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'}
if [[ -n $unexpected ]]; then
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
local omz2='Updating Oh My Zsh'