Setting up PowerShell
These steps improve PowerShell by:
- Adding tabs.
- Changing the tab completion to be more bash like.
- Displaying the current Git branch (if applicable).
Install Windows Terminal §
This step is no longer necessary since Windows Terminal is now included with Windows 11 by default.
- Install Windows Terminal to get tabs (and better WSL integration).
Bash style tab completion §
new-item $profile -itemtype file -forceOpen the profile:
notepad $profilePaste this config which enables bash-like tab completion:
Set-PSReadlineKeyHandler -Key Tab -Function MenuCompleteSave.
Restart PowerShell.
Display current Git branch §
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expressionscoop bucket add extras scoop install posh-gitAdd posh-git to profile:
notepad $profile # Then add: Import-Module posh-git
You can run the command Add-PoshGitToProfile to perform the above step, but you need to restart the shell for it to be available, and in my experience it seems to overwrite the profile which is not ideal. So I prefer to add the import manually.
Install Python at specific version §
Doing scoop install python will default to the latest, but it has older versions available.
Add the versions bucket:
scoop bucket add versionsInstall the desired Python version:
scoop install versions/python310
Install pipx §
Install pipx and add to path:
scoop install pipx pipx ensurepath
Install Poetry §
Install Poetry via pipx:
pipx install poetry