Repository: terminal
Issue: MEGATHREAD: Commandline Args Follow-Up Work
Labels: Area-UserInterface,Product-Terminal,Issue-Scenario,Area-Commandline

## 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>