Closed stephenmatheis closed 2 years ago
You can fix this by setting the value of terminate hatch job within terminal.integrated.autoReplies to null
@meganrogge, Thank you so much! I should have checked if this was a setting first. Just curious - is this a new setting/behavior? Just started happening with 1.64.
This is still a bug.
This happens for me too. Every time I type CTRL+C
it autoresponds Y
. Now every time I type anything in the terminal after this, it writes Y after it:
Y : The term 'Y' is not recognized as the name of a cmdlet, function, script file, or operable progr
am. Check the spelling of the name, or if a path was included, verify that the path is correct and t
ry again.
At line:1 char:1
+ Y
+ ~
+ CategoryInfo : ObjectNotFound: (Y:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
If I type any command that gives a prompt, it stops autoresponding with Y
. It also seems that writing git commands in the terminal somehow stops the Y
autoresponse.
Edit: Like like @meganrogge mentioned, adding
"terminal.integrated.autoReplies": {
"Terminate batch job (Y/N)": null
}
to settings.json will prevent this from happening. Note that this is just a workaround, since it does not fix the actual issue of Y
being responded to any message, but rather disables the autoresponse alltogether
I bet this is conpty reprinting causing duplicate responses 🤦
Updating to Windows 11 might workaround this as I've never hit this issue. The theory is that something running in the terminal is triggering conpty (the backend component) to reprint the screen which would re-output the match text.
Thanks for the report, I'm going to disable it by default to be safe. We also had an idea for later on to allow the feature to be discovered intuitively when the user responds manually.
How to configure for the batch job message is now called out in the docs:
meganrogge, Thank you so much! I should have checked if this was a setting first. Just curious - is this a new setting/behavior? Just started happening with 1.64.
This indeed is new with 1.64, see the release notes for details.
I'm trying to use this to automatically enter Y when terminating a batch job. It is giving me an error after my next command though, because it enters "Y" again. This is what I have in settings.json:
And this is my terminal:
I saw Windows 11 was mentioned above. Do I need to be on that in order to use this feature?
Yes on older versions of Windows this is less reliable as the terminal emulation provided by Windows ends up reprinting the screen, causing the phrase to show up again.
Shouldn't this be fixed for Windows 10 too though? It's still supported by Microsoft and VSCode, right?
So is the conclusion just "Not supported you gotta disable it on Windows 10 yourself" and case closed? Doesn't seem right.
Ok I see you disabled it by default in a merge request. So the state is now "this isn't supported on Windows 10"?
How about this:
Currently it seems to go "if (buffer.Contains(trigger)) send(reply);"
So what if instead it goes "if (buffer.Contains(trigger) && !buffer.Contains(trigger+reply)) send(reply);"
You know, just check if the line that was found already has a reply?
Thanks for the reply. I don't think it is OK to leave it as is. I saw it in the release notes (https://code.visualstudio.com/updates/v1_64#_automatic-replies) and spent way too much time trying to get it to work before finding this thread. Can it either be fixed to work with Windows 10 or update the docs to make it clear that Windows 11 is needed?
Thank you so much for looking into this 🙏 !
Issue Type: Bug
VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:22:20.678Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No
System Info
|Item|Value| |---|---| |CPUs|AMD Ryzen 9 3900X 12-Core Processor (24 x 3793)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.93GB (22.74GB free)| |Process Argv|C:\\Users\\steph\\OneDrive\\Documents\\GitHub\\robi --crash-reporter-id bc47a489-a287-44e8-9f71-a241e2b29255| |Screen Reader|no| |VM|0%|
Extensions (10)
Extension|Author (truncated)|Version ---|---|--- es6-string-css|bas|0.1.0 python|ms-|2022.0.1786462952 vscode-pylance|ms-|2022.2.0 jupyter|ms-|2022.1.1001775990 remote-wsl|ms-|0.64.2 powershell|ms-|2021.12.0 LiveServer|rit|5.7.4 es6-string-html|Tob|2.12.0 vscode-todo-highlight|way|1.0.5 es6-string-javascript|zjc|1.0.1A/B Experiments
``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392cf:30425750 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30433059 pythonvs932:30410667 wslgetstartedc:30433508 vscop940:30404999 vsrem710:30416614 vscop841:30430977 ```