-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wt.exe
: Add support for "short" sub-commands (#6576)
This adds `nt`, `sp`, and `ft` as aliases for `new-tab`, `split-pane`, and `focus-tab`, respectively. These do exactly the same thing as their long for counterparts, but are just shorter, for those of us who type slower than a fifth grader 👀 Now you can do ``` wt nt cmd.exe /k #work 15 ; sp cmd.exe /k #work 15 ; sp cmd.exe /k media-commandline ; nt powershell dev\\symbols.ps1 ; nt -p \"Ubuntu\" ; nt -p \"Ubuntu\" ; ft -t 0 ``` instead of ``` new-tab cmd.exe /k #work 15 ; split-pane cmd.exe /k #work 15 ; split-pane cmd.exe /k media-commandline ; new-tab powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu\" ; new-tab -p \"Ubuntu\" ; focus-tab -t 0 ``` The pattern I'm using here is that each of these subcommands now has a little helper lambda that actually sets up the subcommand with the required arguments, and we just call that lambda twice, once for the long-form of the command, and again for the short. I imagine that in the future, we won't necessarily have short-forms for every subcommands, so if there are future conflicts we'd have to figure that out pre-emptively, but these all seem like they'll need a short form. Closes #5466
- Loading branch information
1 parent
54a7fce
commit 445da4b
Showing
4 changed files
with
189 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.