As @Biclops suggested, there is good info here: configure PowerShell to only show the current folder in the prompt
However, I needed more basic info to get this to work. This is a very good resource to get started: Windows PowerShell Profiles. So I first followed the steps suggested there:
[always using vscode’s integrated terminal using PowerShell]
test-path $profile
(is there a profile set up?)new-item -path $profile -itemtype file -force
(assuming the answer to the above is false)notepad $profile
(opens notepad)-
paste in (from the SuperUser answer above)
function prompt { $p = Split-Path -leaf -path (Get-Location) "$p> " }
- save (you shouldn’t have to chose a location, it is already done for you)
- reload vscode – you will probably get an error message about running scripts (or just do next step before reload)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
(at your integrated terminal PS prompt, also from the SuperUser answer)- reload vscode
- You should be good to go!