MEGATHREAD: Commandline Args Follow-Up Work #6510

Open
opened 2026-01-31 00:40:36 +00:00 by claunia · 9 comments
Owner

Originally created by @zadjii-msft on GitHub (Feb 18, 2020).

Reference

Untriaged Bugs/Features

  • #4619 wt does not handle newlines properly

1.0 Bugs

  • #4618 wt command-line cannot consistently parse more than one argument
  • #4602 WT -? -help --help window should include a link to the command line arguments
  • #4571 wt.exe /d doesn't work if the directory path ends in '' and is quoted

The Help Dialog

Post 1.0 features

  • #4620 Add support for initialPosition and others
    • From the spec:

    When parsing a new-tab command, configure the TerminalApp::AppLogic to
    set some initial state about itself, to handle the new-tab arguments
    [--initialPosition, --maximized, --initialRows, --initialCols]. Only
    set this state for the first new-tab parsed. These settings will overwrite
    the corresponding global properties on launch.

  • #5464 Add support for focus-pane
  • Add support for a profile to launch multiple panes using wt commands
  • Add support for running a set of wt commands on startup
  • #5466 Add support for "short" command name aliases (like sp for split-pane)
  • Add support for running commands on an existing wt window (e.g. wt -s 0 split-pane opens a pane in the current window)
    • Add support for wt.exe to run commands in an existing Terminal Window #4472
  • #6183 Add support for -t,--title title to set the startingTitle of a new terminal session (add to terminal_parameters)
  • #6298 wt.exe should support -%,--percent for setting a pane's size on the commandline
  • #6580 Maybe add support for move-focus subcommand
  • Add command-line option start terminal in focus mode (after/during #7825)
  • Set tab color in command line #8075

2.0 Bugs

Backlog

Discussion

  • #4611 -H and -V parameters shouldn't be case-sensitive
  • #4570 ; is an annoying separator character
  • #4601 long form arguments (e.g. --profile) have poor discoverability
  • Windows commandline args are usually /fooBar but ours are --fooBar and that's weird
  • #5801 Add support for launching fullscreen?
Other related discussion
  • Pass commands to new wt instance. Is this already supported? #4598
  • Add support for wt.exe to run commands in the current Terminal Window #4656
  • wt support run command in application #4864
  • Shouldn't help ( -h or --help) print to the console? #4887
Originally created by @zadjii-msft on GitHub (Feb 18, 2020). ## Reference * Original issue: #607 * [Original Spec](https://github.com/microsoft/terminal/blob/master/doc/specs/%23607%20-%20Commandline%20Arguments%20for%20the%20Windows%20Terminal.md) (Added in #3495) * Initial Implementation PR: #4023 * [UsingCommandlineArguments.md](https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingCommandlineArguments.md) ## Untriaged Bugs/Features * [x] #4619 wt does not handle newlines properly ## 1.0 Bugs * [x] #4618 wt command-line cannot consistently parse more than one argument * [ ] #4602 WT -? -help --help window should include a link to the command line arguments * [ ] #4571 wt.exe /d doesn't work if the directory path ends in '\' and is quoted ## The Help Dialog * [x] #4612 Help windows contain different help messages dependent of the way how help is triggered. * [ ] The Help Dialog should have copy-pasteable text * [ ] #4134 ## Post 1.0 features * [ ] #4620 Add support for `initialPosition` and others - From the spec: > When parsing a `new-tab` command, configure the `TerminalApp::AppLogic` to set some initial state about itself, to handle the `new-tab` arguments [`--initialPosition`, `--maximized`, `--initialRows`, `--initialCols`]. Only set this state for the first `new-tab` parsed. These settings will overwrite the corresponding global properties on launch. * [x] #5464 Add support for `focus-pane` * [x] Add support for a profile to launch multiple panes using `wt` commands * [x] Add support for running a set of `wt` commands on startup * [x] #5466 Add support for "short" command name aliases (like `sp` for `split-pane`) * [x] Add support for running commands on an existing wt window (e.g. `wt -s 0 split-pane` opens a pane in the current window) - Add support for wt.exe to run commands in an existing Terminal Window #4472 * [x] #6183 Add support for `-t,--title title` to set the startingTitle of a new terminal session (add to `terminal_parameters`) * [x] #6298 `wt.exe` should support `-%,--percent` for setting a pane's size on the commandline * [x] #6580 Maybe add support for `move-focus` subcommand * [x] Add command-line option start terminal in focus mode (after/during #7825) * [x] Set tab color in command line #8075 ## 2.0 Bugs * [x] Fails to launch maximized/fullscreen and the given profile #7318 * [x] The nextTab and prevTab actions do not work correctly when initiated via wt.exe or the command palette #10070 * [ ] #12191 ## Backlog * [ ] #5462 Add support for `open-settings` * [ ] #5465 Add support for `--file,-f configuration_file` for reading a list of commands from a file * [ ] Add command-line option start terminal minimized #7374 * [ ] Add support for `send-input` subcommand #9368 * [ ] Allow for ExecuteCommandline actions to be called straight from the commandline #9994 * [ ] Command line spec/override for closeOnExit #10019 * [ ] #4637 Other options for overriding profile starting directory * [ ] #5528 Add support for appending a commandline to a profile's commandline * [ ] WT probably needs a CLI exe to interact with the Terminal via the command line. * [ ] #7258 `wt --help` should print text to terminal, instead of popping open a modal dialog * [ ] #11616 * [ ] #5463 Add support for `list-profiles` * [ ] #15496 * [ ] #16008 ## Discussion * [x] #4611 -H and -V parameters shouldn't be case-sensitive * [x] #4570 `;` is an annoying separator character * [x] #4601 long form arguments (e.g. `--profile`) have poor discoverability * [x] Windows commandline args are usually `/fooBar` but ours are `--fooBar` and that's weird * [x] #5801 Add support for launching fullscreen? <details> <summary>Other related discussion</summary> * Pass commands to new wt instance. Is this already supported? #4598 * Add support for wt.exe to run commands in the current Terminal Window #4656 * wt support run command in application #4864 * Shouldn't help ( -h or --help) print to the console? #4887 </details>
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 21, 2020):

I've moved #4619, #4618 and and #4602 into the v1.0 milestone.

@DHowett-MSFT commented on GitHub (Feb 21, 2020): I've moved #4619, #4618 and and #4602 into the v1.0 milestone.
Author
Owner

@Karl-WE commented on GitHub (Feb 23, 2020):

for any new args please consider reading and support this feature request before it get's out of control / focus.
Reference #4601

@Karl-WE commented on GitHub (Feb 23, 2020): for any new args please consider reading and support this feature request before it get's out of control / focus. Reference #4601
Author
Owner

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

@zadjii-msft Please add https://github.com/microsoft/terminal/issues/5494 to the list to add -v, --version to the list of args. All other Windows apps (linux apps too, but different arg) allow viewing the version via CLI (even if we need it to simply open up the About page).

@WSLUser commented on GitHub (Apr 23, 2020): @zadjii-msft Please add https://github.com/microsoft/terminal/issues/5494 to the list to add `-v, --version` to the list of args. All other Windows apps (linux apps too, but different arg) allow viewing the version via CLI (even if we need it to simply open up the About page).
Author
Owner

@Guiorgy commented on GitHub (Aug 19, 2020):

Windows commandline args are usually /fooBar but ours are --fooBar and that's weird

Is there an open discussion for this, or is this only internal for now?

@Guiorgy commented on GitHub (Aug 19, 2020): > Windows commandline args are usually /fooBar but ours are --fooBar and that's weird Is there an open discussion for this, or is this only internal for now?
Author
Owner

@zadjii-msft commented on GitHub (Aug 19, 2020):

@Guiorgy I don't think there's a current nogoing discussion, but there's mot really any chance that we'll change this, considering that 1.0 has already shipped with --fooBar args.

As we discovered over in https://github.com/microsoft/terminal/issues/4601#issuecomment-590879396, it turns out that /fooBar style params will actually secretly work as well, but we're not officially documenting that in case CLI11 ever changes that out from underneath us.

@zadjii-msft commented on GitHub (Aug 19, 2020): @Guiorgy I don't think there's a current nogoing discussion, but there's mot really any chance that we'll change this, considering that 1.0 has already shipped with `--fooBar` args. As we discovered over in https://github.com/microsoft/terminal/issues/4601#issuecomment-590879396, it turns out that `/fooBar` style params will actually secretly work as well, but we're not officially documenting that in case CLI11 ever changes that out from underneath us.
Author
Owner

@Guiorgy commented on GitHub (Aug 19, 2020):

@zadjii-msft Oh wow, it does work! 😃
Anyways, glad to hear that -- isn't going anywhere. Personally, I hope you officially support both at some point.

@Guiorgy commented on GitHub (Aug 19, 2020): @zadjii-msft Oh wow, it does work! 😃 Anyways, glad to hear that `--` isn't going anywhere. Personally, I hope you *officially* support both at some point.
Author
Owner

@rashil2000 commented on GitHub (Jul 23, 2021):

Sorry, I couldn't find any documentation, but are --height or --width options for launching new window planned/supported?

(Use case: a desktop shortcut for opening neovim in WT. I'd like that window to be larger than what I have normally set for the terminal in settings.json through the initialRows and initialCols options)

@rashil2000 commented on GitHub (Jul 23, 2021): Sorry, I couldn't find any documentation, but are `--height` or `--width` options for launching new window planned/supported? (Use case: a desktop shortcut for opening neovim in WT. I'd like that window to be larger than what I have normally set for the terminal in settings.json through the `initialRows` and `initialCols` options)
Author
Owner

@honeylizard commented on GitHub (Feb 16, 2022):

After opening a WLS profile (e.g. Ubuntu), is there anyway to pass Unix style commands?

Running wt.exe new-tab -p Ubuntu cd /example/path opens the tab, but the terminal shows the error

[error 0x80070002 when launching 'cd /example/path']

All the examples I've found so far show how to run Windows commands after a new-tab call, but nothing on unix/linux commands...

@honeylizard commented on GitHub (Feb 16, 2022): After opening a WLS profile (e.g. Ubuntu), is there anyway to pass Unix style commands? Running `wt.exe new-tab -p Ubuntu cd /example/path` opens the tab, but the terminal shows the error `[error 0x80070002 when launching 'cd /example/path']` All the examples I've found so far show how to run Windows commands after a new-tab call, but nothing on unix/linux commands...
Author
Owner

@htcfreek commented on GitHub (Sep 29, 2023):

und so far show how to run Windows commands after a new-tab call, but nothing on unix/linux commands...

Same for me with PowerShell or other profiles. I opened the issue #16062 .

@htcfreek commented on GitHub (Sep 29, 2023): > und so far show how to run Windows commands after a new-tab call, but nothing on unix/linux commands... Same for me with PowerShell or other profiles. I opened the issue #16062 .
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6510