formulahendry / formulahendry/vscode-code-runner

The code execution command is pasted in the terminal after a potential unexecuted command. Should first clear the terminal prompt

Open
#403 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

Hi, I hope this hasn't already been discussed; I wasn't able to find anything related in the issues.

- VS Code Version: 1.30.0
- OS Version: Ubuntu 16.04 / Linux x64 4.4.0-140-generic
- Code Runner Version: 0.9.5

**Describe the bug**
Pressing Ctrl + Alt + N when the terminal already has an unexecuted command pastes the execution command after this unexecuted command, usually resulting in a benine error.

**To Reproduce**
Steps to reproduce the behavior:

1. Open VSCode and terminal
1. Execute code runner: Ctrl + Alt + N
1. Now in the opened terminal, type any harmless string, such as ```$ eee```, without executing
1. Switch to the editor window and press Ctrl + Alt + N again

**Actual behavior**
Taking python as an example, the executed command is ```$ eee/usr/bin/env python "/my/path/myfile.py"```
As can be expected, this results in: ```bash: eee/usr/bin/env: No such file or directory```

**Expected behavior**
I expected code runner to first clear what's already been typed in the terminal prompt.

In my case this often happens when I inadvertently press the Up arrow in the terminal after execution, which pastes the previous command in the terminal prompt, then go back to the editor window and try to execute the code.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.