allow the user to specify some program to run upon opening a new tab #9790

Closed
opened 2026-01-31 02:03:51 +00:00 by claunia · 3 comments
Owner

Originally created by @jmlucjav on GitHub (Jul 23, 2020).

Some option to allow the user to specify some program to run upon opening a new tab

I don't think it is possible now to say "open a new tab with wsl, and run 'top' on it". The 'run top on it' part seems to be missing. I guess it is not easy to implement or it would have been already done, as it sounds very handy to me?

Proposed technical implementation details (optional)

Add some new options to wt so you can specify what program (with arguments) to run when opening a new tab.

Originally created by @jmlucjav on GitHub (Jul 23, 2020). # Some option to allow the user to specify some program to run upon opening a new tab I don't think it is possible now to say "open a new tab with wsl, and run 'top' on it". The 'run top on it' part seems to be missing. I guess it is not easy to implement or it would have been already done, as it sounds very handy to me? # Proposed technical implementation details (optional) Add some new options to wt so you can specify what program (with arguments) to run when opening a new tab.
Author
Owner

@WSLUser commented on GitHub (Jul 23, 2020):

This is already allowed. However I can see why you didn't realize that. https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings doesn't contain the doc it should for this. You can find it here: https://github.com/microsoft/terminal/blob/master/doc/user-docs/ThirdPartyToolProfiles.md This should be copied to the main Terminal Document repo. I'll file an issue for it.

@WSLUser commented on GitHub (Jul 23, 2020): This is already allowed. However I can see why you didn't realize that. https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings doesn't contain the doc it should for this. You can find it here: https://github.com/microsoft/terminal/blob/master/doc/user-docs/ThirdPartyToolProfiles.md This should be copied to the main Terminal Document repo. I'll file an issue for it.
Author
Owner

@WSLUser commented on GitHub (Jul 23, 2020):

https://github.com/MicrosoftDocs/terminal/issues/98 created to resolve this doc issue.

@WSLUser commented on GitHub (Jul 23, 2020): https://github.com/MicrosoftDocs/terminal/issues/98 created to resolve this doc issue.
Author
Owner

@zadjii-msft commented on GitHub (Jul 23, 2020):

In general, you can make the commandline whatever you want. So if you set the commandline to be wsl top, then the profile will (probably) boot straight into top

(I've got a busted WSL instance at the moment so I can't verify the arguments to wsl.exe, but I think that should work.)

@zadjii-msft commented on GitHub (Jul 23, 2020): In general, you can make the [`commandline`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#command-line) whatever you want. So if you set the `commandline` to be `wsl top`, then the profile will (probably) boot straight into `top` (I've got a busted WSL instance at the moment so I can't verify the arguments to `wsl.exe`, but I think that should work.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9790