How to add custom command line in Windows Terminal

Add custom command line in Windows Terminal

With Windows Terminal, the company is trying to consolidate all command-line utilities into a single UWP shell. By default, it includes Windows PowerShell and the Windows Command Prompt. However, if someone wants it, it can also include another command-line tool. This includes Git Bash, WSL command lines, Anaconda command line, and so on.

Add a custom command line in Windows Terminal

To add a custom command line in Windows Terminal, you will need to manually configure the JSON file for Windows Terminal.

First, copy the highlighted code block below:

{              "acrylicOpacity" : 0.5,              "background" : "#012456",              "closeOnExit" : true,              "colorScheme" : "Campbell",              "commandline" : "",              "cursorColor" : "#FFFFFF",              "cursorShape" : "bar",              "fontFace" : "Consolas",              "fontSize" : 10,              "guid" : "{GUID IS HERE}",              "historySize" : 9001,              "icon" : "ms-appx:///ProfileIcons/{GUID IS HERE}.png",              "name" : "",              "padding" : "0, 0, 0, 0",              "snapOnInput" : true,              "startingDirectory" : "%USERPROFILE%",              "useAcrylic" : false          },

Paste this code snippet into the "Profiles" block inside the JSON file mentioned above.

You must now create a custom GUID for your command line.

Generate a new GUID for your application right here.

Copy this newly generated GUID into the code snippet given above.

Make subtle changes, such as the name of the application and the customization of the icon in the code snippet.

Enter the path of the executable file of the new command line in "command line" element of the code block we just copied into the given JSON file and save the file.

Restart the Windows terminal to find the newly added command line ready to be launched using the arrow key.

I hope you found this guide helpful!

Leave a Reply