gnachman / iterm2-website

Website for iTerm2
http://iterm2.com/
GNU General Public License v2.0
80 stars 66 forks source link

$ITERM2_SQUELCH_MARK breaks ZSH Shell Integration #63

Closed vaaralav closed 5 years ago

vaaralav commented 5 years ago

I just installed Shell Integration and got the following error: .iterm2_shell_integration.zsh:107: parse error near]]'`

Removing || $ITERM2_SQUELCH_MARK on that line fixed the issue.

gnachman commented 5 years ago

Strange, I cannot reproduce this. If you change it to this does it fix it?

if [[ $PS1 == *"$(iterm2_prompt_mark)"* ]] || [[ $ITERM2_SQUELCH_MARK ]]
silvanet123 commented 5 years ago

I am having the same issue. gnachman, I tried your request change and it did not fix it. removing "|| $ITERM2_SQUELCH_MARK" fixes it for me as well.

gnachman commented 5 years ago

What version of zsh exhibits this behavior? I tested on zsh 5.3 and 5.7.1 and haven't been able to reproduce it yet.

Does this work better:

if [[ $X == *"$(iterm2_prompt_mark)"* ]] || (( ${+ITERM2_SQUELCH_MARK} )); then
vaaralav commented 5 years ago
> zsh --version
zsh 5.0.2 (i686-pc-linux-gnu)
silvanet123 commented 5 years ago

zsh --version

zsh 5.0.2 (x86_64-redhat-linux-gnu)

the new line gets past line 107 and I get the following error .iterm2_shellintegration.zsh:111: parse error near `PS1="$PS1%{$(iterm2...'

gnachman commented 5 years ago

Should be fixed by commit eb2beac. Please verify:

https://raw.githubusercontent.com/gnachman/iterm2-website/master/source/shell_integration/zsh

silvanet123 commented 5 years ago

The error has gone away for me. Thanks!!