7

The Windows Terminal made better with the Command Palette plus Multiple Actions...

 3 years ago
source link: https://www.hanselman.com/blog/the-windows-terminal-made-better-with-the-command-palette-plus-multiple-actions-in-one-command
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
The Windows Terminal made better with the Command Palette plus Multiple Actions in one Command
Sponsored By

I thought I knew everything about the open source Windows Terminal and then I hit Ctrl+Shift+P like I do in VS Code (muscle memory) and it pops up a lovely Command Palette. You can search for any command and see the current keybinding. Super useful if you haven't yet discovered Window Panes. You can also type new wt.exe command lines and affect the current window.

NOTE: Don't forget, "wt" is an alias for the Windows Terminal, so you can Win+R and type wt and run it!

You can create your own commands and even nest them in the Palette! You can even iterate over other objects/profiles in your settings and dynamically create commands!

Since the wt.exe allows for chained commands, I can create a custom command in settings that calls wt.exe with chained commands/actions and bingo, I have a command called Development that opens multiple profiles, splits the screen and sets me up for Windows+Linux development in a single move!

Here I have a new command called Development that calls wt with a new-tab with a named profile, then a split-pane with another named profile.

"keybindings":
[
{
"command":
{
"action": "wt",
"commandline": "new-tab -p \"Powershell\" ; split-pane -p \"Ubuntu-18.04\""
},
"name": "Development"
},
...

Here's the result!

Split screen

Oh, and by the way, you can also apply Shaders to the Windows Terminal...in real time! So that's AWESOME.

CRT Effect!

Have fun! Thanks to Kayla for her help on this post!


Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK