romkatv / powerlevel10k

A Zsh theme
MIT License
46.51k stars 2.19k forks source link

[zimfw] Unintended echo before my output #24

Closed bbaserdem closed 5 years ago

bbaserdem commented 5 years ago

I do not know what causes this, but I switched to powerlevel10k, and I am getting ${_P9K_HOOK1+${_P9K_HOOK2-${_P9K_HOOK2=}$(echo >&12)}}${_P9K_HOOK1=} before every line. With powerlevel9k, I don't have this problem.

I am using the promp theme along zimfw, and used the following commands to install it;

git clone --recursive 'https://github.com/romkatv/powerlevel10k.git' \
    "${ZIM_HOME}/modules/prompt/external-themes/powerlevel10k"
ln -sf "${ZIM_HOME}/modules/prompt/external-themes/powerlevel10k/powerlevel10k.zsh-theme" 
    "${ZIM_HOME}/modules/prompt/functions/prompt_powerlevel10k_setup"

Which is how powerlevel9k is originally installed on zimfw.

I set the theme to be zprompt_theme='powerlevel10k'.

romkatv commented 5 years ago

Please send me the output of setopt.

bbaserdem commented 5 years ago

Here is the output;

╭─   790  sbp@sbplaptop
╰─ ${_P9K_HOOK1+${_P9K_HOOK2-${_P9K_HOOK2=}$(echo >&12)}}${_P9K_HOOK1=}setopt
alwaystoend
autocd
autopushd
autoresume
nobeep
nobgnice
nocaseglob
nocheckjobs
noclobber
completeinword
correct
extendedglob
extendedhistory
histignorealldups
histignoredups
histignorespace
histsavenodups
histverify
nohup
interactive
interactivecomments
nolistbeep
longlistjobs
monitor
pathdirs
pushdignoredups
pushdsilent
pushdtohome
sharehistory
shinstdin
zle
romkatv commented 5 years ago

Thank you. Something has removed promptsubst.

Please git pull Powerlevel10k and try again. If this doesn't work, manually type setopt promptsubst. Do let me know how both of these experiments go.

bbaserdem commented 5 years ago

I did a git pull and saw that only two lines changed in powerlevel9k.zsh-theme however, behaviour persists.

When I run setopt promptsubst, it fixes the issue.

Thank you for looking into this; is this theme related? Or zimfw related?

It is probably zimfw if it is, I can run the command in my zshrc in the meantime as a fix.

romkatv commented 5 years ago

Is this theme related? Or zimfw related?

I don't know. Trying to figure out. Powerlevel10k needs promptsubst and it sets this option when loading. Then some other code removes this options.

I took a quick look at zimfw and I might have an idea. I just made another commit. Please pull and retry.

bbaserdem commented 5 years ago

The latest commit fixes the issue without my intervention. Thank you a lot.

romkatv commented 5 years ago

Phew. Thanks a ton for you help debugging this!