From the course: Visual Studio: Source Control with Git and GitHub

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Change the PowerShell command prompt

Change the PowerShell command prompt - Visual Studio Tutorial

From the course: Visual Studio: Source Control with Git and GitHub

Start my 1-month free trial

Change the PowerShell command prompt

- [Instructor] Here I am in Powershell, and I've drilled down into the folder that I want to demonstrate in this chapter. And you can see that my path is getting long, and it's hard to see when I'm typing on the command line. You might run into this issue too as you work on deeper and deeper folders. One way I could solve this is to maximize the Powershell window, but as you've seen in this course, I like to have Powershell docked to one side of the window and Visual Studio docked to the other side. So, let me share with you a script that I've written, that lets you trim off the start of the directory string. It's over here on GitHub in one of my Gists, it's called TruncatedPowershellPrompt, you can see the URL in the overlay. I'll copy this last one here, the one with three directories, so we'll copy that, and go over here and paste it into Powershell, clear the screen, and you'll see I also changed the color to this…

Contents