Add optional infine-looping command-line parameter for WindowsTerminal profiles #14922

Closed
opened 2026-01-31 04:23:19 +00:00 by claunia · 2 comments
Owner

Originally created by @vini-nu on GitHub (Aug 21, 2021).

Description of the new feature/enhancement

Add boolean parameter if WindowsTerminal profile's command line should repeat every 1s in case command finishes. This would be useful for automatically restarting openssh sessions on the same tab. Currently you need to clone tab and reopen it again.

Proposed technical implementation details (optional)

E.g. I tried to implement this by typing this command-line profile: while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1}

But it doesn't work. I get [error 0x80070002 when launching while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1}] error.

If profile's command-line infine-loop+delay would be integrated inside WindowsTerminal, then it would be easier appliable

Thank you for creating this greater alternative tool to PuTTY.

Originally created by @vini-nu on GitHub (Aug 21, 2021). # Description of the new feature/enhancement Add boolean parameter if WindowsTerminal profile's command line should repeat every 1s in case command finishes. This would be useful for automatically restarting openssh sessions on the same tab. Currently you need to clone tab and reopen it again. # Proposed technical implementation details (optional) E.g. I tried to implement this by typing this command-line profile: `while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1}` But it doesn't work. I get `[error 0x80070002 when launching while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1}]` error. If profile's command-line infine-loop+delay would be integrated inside WindowsTerminal, then it would be easier appliable Thank you for creating this greater alternative tool to PuTTY.
Author
Owner

@zadjii-msft commented on GitHub (Aug 23, 2021):

You know, I think the even easier way to implement this would be with #4379 or #3726. No need to have an infinite loop to keep trying the commandline, just a button would do well ☺️

/dup #3726
/dup #4379

Also, you might try setting the commandline to powershell -c while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1} or something like that. You need to make sure to set the commandline to powershell running that script

@zadjii-msft commented on GitHub (Aug 23, 2021): You know, I think the even easier way to implement this would be with #4379 or #3726. No need to have an infinite loop to keep trying the commandline, just a button would do well ☺️ /dup #3726 /dup #4379 Also, you might try setting the commandline to `powershell -c while ($true) { ssh vini@192.168.130.251 -p 22 -i ~/.ssh/id_ed25519; start-sleep -seconds 1}` or something like that. You need to make sure to set the commandline to `powershell` running that script
Author
Owner

@ghost commented on GitHub (Aug 23, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Aug 23, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14922