Repository navigation
Unnecessary send text to terminal clutters shell history #22774
Description
Activity
- addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Jan 22, 2024 Thanks for the bug report! We just wanted to quickly acknowledge we received it and can confirm the issue. I'll leave the issue open to investigate what we can do about it.
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jan 23, 2024 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds spikeLabel for issues that need investigation before they can be worked on.Label for issues that need investigation before they can be worked on.and removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jan 23, 2024 Just want to add my two cents, I found this issue while trying to figure out why I was seeing
echo /usr/bin/zshin my command history (zsh, WSL2). While searching for the cause I found that my vscode python logs have a bunch of these lines:/home/jessica/.vscode-server/data/logs/20240122T043331/exthost11/ms-python.python/Python.log 10:2024-01-23 15:36:44.330 [info] Send text to terminal: echo /usr/bin/zsh /home/jessica/.vscode-server/data/logs/20240122T043331/exthost4/ms-python.python/Python.log 8:2024-01-23 11:32:04.950 [info] Send text to terminal: echo /usr/bin/zshI see the logs in my vscode log files going back to early January but I only see history in my
.zsh_historystarting around the 14th of January, so I'm not sure what changed. Happy to provide additional info it will help.We can confirm the issue, thanks.
- addedexperimentingFeature is part of an experimentFeature is part of an experimentand removedneeds spikeLabel for issues that need investigation before they can be worked on.Label for issues that need investigation before they can be worked on.
on Feb 1, 2024 Setting
integrated.shellIntegration.enableto false could prevent this from happening- addedneeds PRReady to be worked onReady to be worked onand removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Feb 5, 2024 Investigation results:
We were sending dummy commands to terminal to check whether shell integration is working. But it seems to have a couple of issues:
- Ends up cluterring terminal history
- Does not work for hidden terminals:
onDidExecuteTerminalCommanddoes not fire events for hidden terminal vscode#199611
I've created #22850 which solves this for now. But this means that we need a better way to check whether shell integration is working.
- added a commit that references this issue
on Feb 5, 2024 - added a commit that references this issue
on Feb 6, 2024 - addedverifiedVerification succeededVerification succeeded
on Feb 21, 2024 - locked as resolved and limited conversation to collaborators
on Mar 23, 2024

Type: Bug
Behaviour
Expected vs. Actual
When using PowerShell 7 with PSReadLine, every time the Python extension is started, the terminal message:
echo C:\Users\Yulie\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exeis sent that floods my shell history file.
The bug has occurred in version
2023.22.0and2023.22.1. The previous version2023.20.0is not affected.Diagnostic data
python.languageServersetting: DefaultOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)User Settings
Extension version: 2023.22.0
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments