Tab search from wt.exe? #23274

Open
opened 2026-01-31 08:37:26 +00:00 by claunia · 3 comments
Owner

Originally created by @SPgreg on GitHub (May 21, 2025).

Hi,

I'm unsure if this is available and if it is, seems documentation might be lacking, though I get the idea of leaving out documented features.

I'm trying to show a list of tabs in the terminal, so I'd like to be able to do something like wt -l tabs and it give me a list of tabs with perhaps some of the details of the tab, such as Profile and title and such.

In my use case, I'm running a script which opens up other tabs and runs a simple ssh command in those tabs. The reason I'm using my own setup and not some SSH client that already exists is that I have a lot of customization I want to match the network I'm tying into and it's an absolute nightmare to setup even an existing putty instance without significant modification.

So, what I'm hoping for is a way to list the open tabs and if there's already an existing tab, just change the focus to match that tab, rather than opening a new one, unless I want to.

Anyway, please let me know if this exists and if not, know of how I can generate a list?

Ohh, btw, this got me thinking. Could it be possible to add a "send after start" and "send before end script" in the Profiles?
Basically something that will be sent to the new tab/pane/whatever after initialization and before it exits... tangent.

Thanks,
Greg

Originally created by @SPgreg on GitHub (May 21, 2025). Hi, I'm unsure if this is available and if it is, seems documentation might be lacking, though I get the idea of leaving out documented features. I'm trying to show a list of tabs in the terminal, so I'd like to be able to do something like `wt -l tabs` and it give me a list of tabs with perhaps some of the details of the tab, such as Profile and title and such. In my use case, I'm running a script which opens up other tabs and runs a simple ssh command in those tabs. The reason I'm using my own setup and not some SSH client that already exists is that I have a lot of customization I want to match the network I'm tying into and it's an absolute nightmare to setup even an existing putty instance without significant modification. So, what I'm hoping for is a way to list the open tabs and if there's already an existing tab, just change the focus to match that tab, rather than opening a new one, unless I want to. Anyway, please let me know if this exists and if not, know of how I can generate a list? Ohh, btw, this got me thinking. Could it be possible to add a "send after start" and "send before end script" in the Profiles? Basically something that will be sent to the new tab/pane/whatever after initialization and before it exits... tangent. Thanks, Greg
Author
Owner

@alan-skimmer commented on GitHub (May 21, 2025):

I have a similar need to know if a window and tab already exists from PowerShell scripts. Any clues or documentation you could provide would be very helpful.

Thanks,
Alan

@alan-skimmer commented on GitHub (May 21, 2025): I have a similar need to know if a window and tab already exists from PowerShell scripts. Any clues or documentation you could provide would be very helpful. Thanks, Alan
Author
Owner

@DHowett commented on GitHub (May 28, 2025):

Right now, we don't have a good way for wt to (1) read session info back from a running instance of Terminal or (2) produce its own output, since it is a Win32 (rather than Console) subsystem application.

We're also not likely to move in that direction any time soon.

Regardless, I'm gonna tag this one up for the backlog as a desirable feature.

@DHowett commented on GitHub (May 28, 2025): Right now, we don't have a good way for `wt` to (1) read session info back from a running instance of Terminal or (2) produce its own output, since it is a Win32 (rather than Console) subsystem application. We're also not likely to move in that direction any time soon. Regardless, I'm gonna tag this one up for the backlog as a desirable feature.
Author
Owner

@DHowett commented on GitHub (May 28, 2025):

Ohh, btw, this got me thinking. Could it be possible to add a "send after start" and "send before end script" in the Profiles?
Basically something that will be sent to the new tab/pane/whatever after initialization and before it exits... tangent.

Now this we have been actively resistant to add. You can run anything you want before your shell starts (pwsh -noexit -c foo) or after it exits (pwsh -noprofile -c pwsh ; foo) by coming up with increasingly wild commandlines. 🙂

@DHowett commented on GitHub (May 28, 2025): > Ohh, btw, this got me thinking. Could it be possible to add a "send after start" and "send before end script" in the Profiles? > Basically something that will be sent to the new tab/pane/whatever after initialization and before it exits... tangent. Now _this_ we have been actively resistant to add. You can run anything you want before your shell starts (`pwsh -noexit -c foo`) or after it exits (`pwsh -noprofile -c pwsh ; foo`) by coming up with increasingly wild commandlines. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23274