Please don't require injecting strings into the integrated terminal #1558
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Is your feature request related to a problem? Please describe.
I'm always frustrated when I see commands get entered in the VSCode terminal, executed, and then cleared from view. It feels like a sketchy thing to be doing. I see that the commands are to update PATH:
vscode-go/src/goEnvironmentStatus.ts
Lines 409 to 421 in d88ee9b
I've also noticed that if there is already text written into the shell, the automatic commands simply append to the partial command and a broken mashup of the commands are executed. Injecting enter keystrokes without a visible trigger is not safe.
My primary written language is not golang so I'd rather not have the golang extension act like it has ownership over my terminal.
Describe the solution you'd like
If the injection of PATH commands is absolutely necessary to provide a working out-of-box experience, I'd like to see a toggle to disable this behavior, or documentation on how to "fix" the environment to not require PATH changes.
I already have the correct
go
in my shell's environment and do not need the PATH change. vscode-go appears unaware of this.Describe alternatives you've considered
The extension could instead provide an toast window which indicates that the go version is not in PATH, with a button to inject the commands. This way the user can close the dialog if they will not be using go in the session.
Any recurring dialog like this would also need to provide documentation (via link or otherwise) on how to correct the configuration so that future sessions will not need the command injected anymore.
Additional context
I'm using the
code-server
distribution of VSCode on macOS, and have it configured to be started as a service usinglaunchctl
:Perhaps related to using
code-server
, I've noticed that only the initial terminal tab receives the command injection. So $PATH is different between my terminal tabs. The code in this extension seems to try to inject into every opened terminal so that might be perhaps to some different implementation ofcode-server
terminals.The text was updated successfully, but these errors were encountered: