Skip to content
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

PowerToys Run Shell integration; default terminal profile is not used #28876

Closed
ArthurHuyghe opened this issue Sep 28, 2023 · 9 comments
Closed
Assignees
Labels
Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface Status-Reproducible This issue was reproduced by a maintainer

Comments

@ArthurHuyghe
Copy link

Microsoft PowerToys version

0.74.0

Installation method

WinGet, Chocolatey

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

Launch PowerToys Run and enter a Shell command like ping github.com while the Shell integration is set to use windows terminal.

✔️ Expected Behavior

When a command like ping github.com is launche₫ with PowerToys Run, it should open a new instance of Windows Terminal with the default profile. Or there should be a possibility to set the profile you want to use.

❌ Actual Behavior

It opened a terminal instance with the legacy powershell 5.

Other Software

Windows Terminal version: 1.18.2681.0

@ArthurHuyghe ArthurHuyghe added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Sep 28, 2023
@htcfreek htcfreek added the Run-Plugin Things that relate with PowerToys Run's plugin interface label Sep 28, 2023
@htcfreek

This comment has been minimized.

@htcfreek
Copy link
Collaborator

@htcfreek htcfreek added Status-Reproducible This issue was reproduced by a maintainer and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Sep 28, 2023
@htcfreek htcfreek self-assigned this Sep 29, 2023
@htcfreek
Copy link
Collaborator

htcfreek commented Sep 29, 2023

From what I have tested using the default profile is impossible because of two problems (keeping window open setting and microsoft/terminal#16062)

But I can rework the behavior that the user selects the shell (e.g. PowerShell 7) and has a checkbox to run Shells (cmd, ps 5, pwsh 7) in WT. Does that sounds good to you?

cc: @jaimecbernardo

@ArthurHuyghe
Copy link
Author

@htcfreek, thanks for the quick response. Your suggestion sounds like a good idea. However, maybe this is something you could use to make this work; https://learn.microsoft.com/nl-be/windows/terminal/command-line-arguments?tabs=powershell#open-a-new-profile-instance
In this way you could set a profile to use when executing the shell command. Maybe this opens a possibilty to select a profile to use for executing the shell commands in the terminal.

@htcfreek
Copy link
Collaborator

@htcfreek, thanks for the quick response. Your suggestion sounds like a good idea. However, maybe this is something you could use to make this work; https://learn.microsoft.com/nl-be/windows/terminal/command-line-arguments?tabs=powershell#open-a-new-profile-instance
In this way you could set a profile to use when executing the shell command. Maybe this opens a possibilty to select a profile to use for executing the shell commands in the terminal.

Two problems:

  1. This does not support "keep window open".
  2. This requires v1.19 of WT which is a prerelease.

@ArthurHuyghe
Copy link
Author

I did not in fact needed v1.19 to be able to use wt -w -1 nt which opens a new tab in a new window with the default profile. I'm currently running v1.18.2681.0. installed using winget.

However I do not know if why it does not support "keep window open" and if its something we could change.

@htcfreek
Copy link
Collaborator

htcfreek commented Sep 29, 2023

@ArthurHuyghe

  1. I agree that using the default profile is possible without having v1.19.
  2. The --appendCommandline feature from WT 1.19 would help to use specific profiles for executing a command. (Currently we need to start powershell.exe in the default profile if it is not the default.)
  3. I have opened an issue for the "keep window open" feature.

The main question is how we can implement it in a simple and user friendly way. (I plan to implement #28889 later if WT 1.19 is stable, if I remove an dropdown item settings will crash and the "keep shell open" setting isn't working in all WT scenarios.)

@ArthurHuyghe
Copy link
Author

@htcfreek Great! Then we can only wait until they release v1.19.

Maybe you could make a dropdown allowing the user to choose between the default profile (by using wt -w -1 nt perhaps 🤷‍♂️) or between one of the suggestion you mentioned in your first comment.

@htcfreek htcfreek added the Status-In progress This issue or work-item is under development label Oct 3, 2023
@jaimecbernardo jaimecbernardo added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label Oct 11, 2023
@jaimecbernardo jaimecbernardo removed the Status-In progress This issue or work-item is under development label Oct 11, 2023
@htcfreek
Copy link
Collaborator

This fix/feature is included in the new 0.75.0 release of PowerToys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface Status-Reproducible This issue was reproduced by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants