Skip to content

Enhancement: Prevent keyboard input to new terminals when activating environments #4558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
goodside opened this issue Feb 26, 2019 · 2 comments
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug

Comments

@goodside
Copy link

Environment data

  • VS Code version: Version 1.31.0 (1.31.0)
  • Extension version (available under the Extensions sidebar): 2019.1.0
  • OS and version: macOS Mojave 10.14.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.1, miniconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv, conda, virtualenv
  • Relevant/affected Python packages and their versions: N/A

Expected behaviour

When opening a new terminal, users will start typing shell commands immediately. If the shell environment is not ready yet, stray keyboard input should not interfere with it loading properly.

Actual behaviour

When VSCode-Python is activating a virtualenv or conda environment, the console will still accept keyboard input, so the user ends up executing an unintended nonsense command. Most of the time this only a small annoyance, but if the user were to start typing rm (a plausible thing to type here) it's pretty bad that this is immediately completed to rm source /path/to/venv/activate<ENTER> and deletes whatever ./source was.

Steps to reproduce:

  1. Open a Python project with an installed virtualenv.
  2. Open a new terminal with shortcut <CTRL> + <BACKTICK>
  3. Begin typing without waiting.

Logs

Terminal output:

$ lssource /Users/goodside/miniconda3/bin/activate
bash: lssource: command not found
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Feb 26, 2019
@Ronkiro
Copy link

Ronkiro commented Feb 27, 2019

Maybe this could be extended to all executions.

When you run something that VSCode users terminal to do it, this can also occur. (Like run code)

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug needs decision labels Feb 27, 2019
@ghost ghost removed triage-needed Needs assignment to the proper sub-team labels Feb 27, 2019
@DonJayamanne DonJayamanne added important Issue identified as high-priority area-terminal and removed important Issue identified as high-priority labels Feb 27, 2019
@luabud
Copy link
Member

luabud commented Apr 2, 2019

Unfortunately, this is not something we're able to fix.

@luabud luabud closed this as completed Apr 2, 2019
@ghost ghost removed the needs decision label Apr 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants