Make Windows PowerShell Work Like a Linux Terminal

mushfiqweb

Mushfiqur Rahman Shishir

Posted on September 17, 2020

Make Windows PowerShell Work Like a Linux Terminal

Windows PowerShell doesn’t come with any git command utilities. But we can extend it to a new level where we can utilize git commands efficiently. In this post, we are going to see how to add auto command suggestions on TAB, branch information, and a working directory in Windows PowerShell.

The following will be the outcome after following this guide.

Alt Text

NEED POWERSHELL GALLERY

To get that look at our default PowerShell, we will install two packages from PowerShell Gallery. To check what that Gallery is about click here. We will install posh-git and oh-my-posh packages as modules. The posh-git will provide prompt with Git status summary information and TAB completion for Git commands, parameters, remotes, and branch names. On the other hand, oh-my-posh will enable us to theme our terminal as our own.

By default, windows don’t have any package provider for PowerShell modules. If we run the following command, the package provider will automatically get installed. So let’s open the PowerShell and run those commands one after another. It will ask for our confirmation to install the packages. Type Y for affirmation and type A to make all upcoming prompt affirmative.

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

FIND A FONT WITH LIGATURES

Next, we need a typographic ligature supported font for our terminal. We will set that font from VSCode settings. Why do we need that? We need that to show the current branch, current changes status, etc. related symbols in the terminal. In this case, the Fira Code will be our best option. March ahead and download Fira Code from here. We need the TTF types so open the TTF folder and install all the fonts.

Find the rest of the article on my blog!

My Other Posts on My Blog

CRUD USING REACT HOOKS AND CONTEXT API

REST API DESIGN GOOD PRACTICES

MAKE WINDOWS POWERSHELL WORK LIKE A LINUX TERMINAL

WINDOWS SANDBOX – TEST BEFORE YOU INSTALL ANYTHING ON YOUR WINDOWS SYSTEM

TOP NEW JAVASCRIPT FEATURES INTRODUCED IN ES2020

CREATE A CUSTOM PROGRESS BAR USING HTML5

HOW TO CREATE ICON INPUT ELEMENT USING HTML AND CSS

ENABLE FILE TRANSFER TO GOOGLE CLOUD COMPUTE ENGINE

INSTALL WORDPRESS ON GOOGLE CLOUD COMPUTE ENGINE

CUSTOMIZE FILE INPUT ELEMENT USING JAVASCRIPT & CSS

💖 💪 🙅 🚩
mushfiqweb
Mushfiqur Rahman Shishir

Posted on September 17, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related