Add --shell-arguments to Windows Terminal CLI #17367

Closed
opened 2026-01-31 05:40:26 +00:00 by claunia · 2 comments
Owner

Originally created by @exo-pla-net on GitHub (Apr 29, 2022).

Currently, using the Windows Terminal CLI, you can easily send launch arguments to PowerShell or cmd.exe.

For example, you can pass the command "pause" to PowerShell or cmd.exe as so:
wt PowerShell -c pause
or
wt cmd /k pause

However, for shells that don't exist in the PATH, you have to write out the full path of the shell's .exe, like this:
wt "C:/Program Files/Git/bin/bash.exe" -c nano

To make launch arguments more convenient, I suggest the new CLI feature:
wt --shell-arguments [yourLaunchArguments]

Now we can send arguments to any given profile, without having to dredge up the shell's file path:
wt -p "Git Bash" --shell-arguments "-c nano"

Originally created by @exo-pla-net on GitHub (Apr 29, 2022). Currently, using the Windows Terminal CLI, you can easily send launch arguments to PowerShell or cmd.exe. For example, you can pass the command "pause" to PowerShell or cmd.exe as so: `wt PowerShell -c pause` or `wt cmd /k pause` However, for shells that don't exist in the PATH, you have to write out the full path of the shell's .exe, like this: `wt "C:/Program Files/Git/bin/bash.exe" -c nano` To make launch arguments more convenient, I suggest the new CLI feature: `wt --shell-arguments [yourLaunchArguments]` Now we can send arguments to any given profile, without having to dredge up the shell's file path: `wt -p "Git Bash" --shell-arguments "-c nano"`
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 05:40:26 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 2, 2022):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #5528 for more discussion.

/dup #5528

@zadjii-msft commented on GitHub (May 2, 2022): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #5528 for more discussion. /dup #5528
Author
Owner

@ghost commented on GitHub (May 2, 2022):

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 (May 2, 2022): 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#17367