formulahendry / formulahendry/vscode-code-runner
[Feature request] Smarter change to Current Working Directory (cwd)
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**

I'm always frustrated when CodeRunner sends a command to the terminal to change to the current working directory. Now, I use the change to CWD setting, and I like it's functionality a lot. However, I don't like that it sends a command to my terminal for it. I'm not a fan of this.
**Describe the solution you'd like**
I think it would be great if CodeRunner started the terminal in the cwd of the code itself. This way, we can skip sending one command manually because that command takes up space and is distracting. A smarter change to cwd - I would really like this in CodeRunner. Seamless and invisible.
**Specifics**
I went through the code and found the relevant code on line:
https://github.com/formulahendry/vscode-code-runner/blob/5764bbab6e383cf4e5762df1af37636bf4622a56/src/codeManager.ts#L454
So you'd probably have to change something on this line to make it work.
**Makeshift solution**
This is what I changed on my laptop to get a nicer output. I do not recommend actually using this in the extension's code, but this is how I'm handling it for the time being:
```ts
this._terminal.sendText(`cd "${cwd}" && cls`);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.