-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch-Process, when used to replace the PowerShell process with an interactive (different) shell session, breaks that session #18433
Comments
The same on Linux. And you can't switch back, |
Thanks for confirming that the problem also affects Linux, @237dmitry (I've updated the initial post).
That is actually by design: |
I understood. But it is unclear why this is necessary? You can simply run another shell right in the current session, in a different buffer, so as not to lose information in the main buffer.
|
As stated in the initial post, this use of That said, (a) it should still work and (b), not knowing what the underlying problem is, more common |
Ok. |
Using |
So, I don't think calling |
Not sure how relevant it is in the real world, but |
I'm guessing that PS> stty
speed 38400 baud;
lflags: echoe echok echoke echoctl pendin
iflags: iutf8
oflags: -oxtabs
cflags: cs8 -parenb
[61.39ms] /Users/steve
PS> pwsh -c { exec stty }
speed 38400 baud;
lflags: echoe echok echoke echoctl pendin
iflags: iutf8
oflags: -oxtabs
cflags: cs8 -parenb
[318.76ms] /Users/steve
PS> pwsh
PowerShell 7.3.0-rc.1
/Users/steve
PS> exec stty
speed 38400 baud;
lflags: -icanon -iexten -echo echoe echok echoke echoctl pendin
iflags: -icrnl -ixon iutf8
oflags: -oxtabs
cflags: cs8 -parenb So interactive mode for PowerShell is doing something affecting the tty. |
Instead of PowerShell, It could be what .NET does, or more specifically, what
|
Prerequisites
Steps to reproduce
Clearly not a common use case, but a bug nonetheless:
When you use
Switch-Process
(exec
) to replace the current PowerShell process (running an interactive session) with a different shell's interactive session (e.g.,bash
), that session's command-line editing is broken.Expected behavior
A regular interactive Bash session.
Actual behavior
What the user types on the Bash command line doesn't print (however, submitting commands and printing output works normally).
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: