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).
Add tabs §
- Install Windows Terminal to get tabs (and better WSL integration).
Bash style tab completion §
new-item $profile -itemtype file -force
Open the profile:
notepad $profile
Paste this config which enables bash-like tab completion:
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Save.
Restart PowerShell.
Display current Git branch §
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop bucket add extras scoop install posh-git Add-PoshGitToProfile
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 versions
Install 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