pure
pure copied to clipboard
Causes VSCode to always create a new integrated terminal (unintended)
General information
- Pure version: latest
- ZSH version: 5.3
- Terminal program & version: iTerm
- Operating system: macOS Mojave
- ZSH framework: zplug
I have:
- [X] Tested with another terminal program and can reproduce the issue:
- [X] Followed the Integration instructions for my framework
Problem description
When using VSCode with integrated terminal debugger every time your restart the debugger vscode creates a new terminal window. This does not happen with bash nor with ZSH with any other theme.
I narrowed it down to the usage of zsh-async somehow.
launch.json:
"console": "integratedTerminal"
Reproduction steps
- Have VSCode create a simple node.js project that you can debug with integrated terminal
- Use zplug and load pure and zsh-async
- Debug a vscode Node.js project and restart the debugger.
My .zshrc
:
source $HOME/.zplug/init.zsh
# zplug plugins
zplug mafredri/zsh-async, from:github
# zplug theme
zplug sindresorhus/pure, use:pure.zsh, from:github, as:theme
# Install packages that have not been installed yet
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
else
echo
fi
fi
zplug load
@5an1ty could you try out the no-zpty
branch of zsh-async?
Keep in mind, it's not feature complete and just a very quick hack, but it mostly works as a drop-in for the current implementation sans some features (like unique job control, flushing, etc).
I'm pretty sure this issue is related to zpty
and I don't think there's a way around it without using an alternative method for async execution.
@mafredri Thanks, but that didn't really help. Changed my zplug to this:
zplug "mafredri/zsh-async", at:no-zpty from:github
And execute zplug update
but didn't really seem to change anything in vscode.
Did you confirm it changed the branch? I'm no zplug expert but judging from the documentation it seems there should be a ,
between at
and from
.
Yes there was a missing comma, but I manually checked out the correct branch:
~/.zplug/repos/mafredri/zsh-async no-zpty ❯ git status On branch no-zpty Your branch is up to date with 'origin/no-zpty'.
nothing to commit, working tree clean
Ok, thanks for confirming. My hunch was that zpty
would cause VS Code to be confused about the shell but it seems that is not the case.
Could you point me to a sample project I can try to reproduce this with? I have never used this feature of Code so not sure where to start.
Very odd, I tried creating a new blank js project and I can't reproduce it. It's specific to one repo it seems. I'll try and update the issue if I figure something out.