-
Notifications
You must be signed in to change notification settings - Fork 498
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
I want F8 to run selected text in the active terminal, not just in the "Integrated PowerShell Console" #1607
Comments
first off, I want to say, I'm on your side and think that we should change the F8 to "Terminal: Run selected text in the active terminal" or have a setting to easily configure it. the biggest problem I have with changing it is this... we will need to educate our customers that don't understand what the PowerShell Integrated Console is. I've had so many people come up to me and say "I don't want to use the PowerShell Integrated Console. I want to use the default one (powershell.exe) because it has PSReadLine and is better" and they don't understand that, if they use "Terminal: Run selected text in the active terminal" with "powershell.exe" that whatever they're running there WILL NOT show up in the Editor at all and a lot of customers don't understand this they don't understand why the PowerShell Integrated Console is there. Why it's so important why it's taken AGES to get PSReadLine to work in it ( ;) @SeeminglyScience ) but the scenario that you've brought up make a TON of sense!
Let's get some feedback from folks and see what makes the most sense to enable both scenarios. |
It's set up that way because when the integrated console was added there was no way to tell what the current focused terminal was. So instead it just always moves the focus to the integrated console. There's been a bunch of API improvements since then though, so it might be possible now.
As long as it's a setting that isn't on by default we should be fine. I don't think there is a ton of overlap between the type of folks who aren't familiar with the PSIC and the type to do heavy customization. Edit: Actually looks like the required API's were just added:
|
Oh I just thought of something... I bet the "Terminal: Run selected text in the active terminal" command doesn't handle multi-line well because we don't handle multi-line well. It will work fine in the CloudShell one because of PSReadLine there... But for us it won't be a good experience, today at least. |
@TylerLeonhardt Yeah, that's why I say those API's are required. The idea would be to check if the integrated console is focused. If it is, then send the custom LSP request to PSES. If it isn't, then call the VSCode command. |
@TylerLeonhardt Yes, "Terminal: Run selected text in the active terminal" command doesn't handle multi-line well. |
I would like F8 to run a selected text in any active terminal, not just in the "Integrated PowerShell Console".
I use more and more PowerShell Core in WSL terminal in VSCode and it would be nice to use F8 to run selected text in that terminal too.
The text was updated successfully, but these errors were encountered: