terminal/src/cascadia/LocalTests_TerminalApp
Mike Griese 43c469fc95
Add support for naming windows with the -w parameter (#9300)
This finishes the implementation of `--window` to also accept a string
as the "name" of the window. So you can say 

```sh
wt -w foo new-tab
wt -w foo split-pane
```

and have both those commands execute in the same window, the one named
"foo". This is just slightly more ergonomic than manually using the IDs
of windows. In the future, I'll be working on renaming windows, and
displaying these names. 

> #### `--window,-w <window-id>`
> Run these commands in the given Windows Terminal session. This enables opening
> new tabs, splits, etc. in already running Windows Terminal windows.
> * If `window-id` is `0`, run the given commands in _the current window_.
> * If `window-id` is a negative number, or the reserved name `new`, run the
>   commands in a _new_ Terminal window.
> * If `window-id` is the ID or name of an existing window, then run the
>   commandline in that window.
> * If `window-id` is _not_ the ID or name of an existing window, create a new
>   window. That window will be assigned the ID or name provided in the
>   commandline. The provided subcommands will be run in that new window.
> * If `window-id` is omitted, then obey the value of `windowingBehavior` when
>   determining which window to run the command in.

Before this PR, I think we didn't actually properly support assigning
the id with `wt -w 12345`. If `12345` didn't exist, it would make a new
window, but just assign it the next id, not assign it 12345.

## References
* #4472, #8135
* https://github.com/microsoft/terminal/projects/5

## Validation Steps Performed
Ran tests
Messed with naming windows, working as expected.

Closes https://github.com/microsoft/terminal/projects/5#card-51431478
2021-03-17 19:28:01 +00:00
..
TestHostApp Add support for "fragment extensions" (#7632) 2021-02-19 02:12:16 +00:00
CommandlineTest.cpp Add support for naming windows with the -w parameter (#9300) 2021-03-17 19:28:01 +00:00
CppWinrtTailored.h Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
FilteredCommandTests.cpp Fix FilteredCommand tests to run on UI thread (#9209) 2021-02-19 18:22:09 +00:00
LocalTests_TerminalApp.def Fix the TabTests! (#3833) 2019-12-06 20:45:08 +00:00
pch.cpp Fix the TabTests! (#3833) 2019-12-06 20:45:08 +00:00
pch.h Fix wt --help (#9246) 2021-02-22 18:50:39 +00:00
SettingsTests.cpp Move TerminalSettings from TermApp to TerminalSettingsModel (#9318) 2021-03-15 23:15:25 +00:00
TabTests.cpp Introduce duplicate tab menu (#9388) 2021-03-08 12:16:56 +00:00
TerminalApp.LocalTests.AppxManifest.prototype.xml Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
TerminalApp.LocalTests.manifest TURNS OUT CASE SENSITIVITY IS IMPORTANT (#2481) 2019-08-20 11:16:06 -07:00
TerminalApp.LocalTests.vcxproj Add a keybinding option to Terminal to open the Settings UI (#8048) 2020-12-11 13:47:10 -08:00