Sam Hooke

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 §

  1. Install Windows Terminal to get tabs (and better WSL integration).

Bash style tab completion §

  1. Create PowerShell profile:

    new-item $profile -itemtype file -force
  2. Open the profile:

    notepad $profile
  3. Paste this config which enables bash-like tab completion:

    Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
  4. Save.

  5. Restart PowerShell.

Display current Git branch §

  1. Install Scoop.

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri | Invoke-Expression
  2. Install posh-git via scoop.

    scoop bucket add extras
    scoop install posh-git

See all notes.

← Previous Note: NiceGUI with async classes
Next Note: Replacing Tox with Poetry and pre-commit for CI linting →