Skip to content

Instantly share code, notes, and snippets.

@shalvah
Created February 16, 2018 22:12
Show Gist options
  • Save shalvah/7a0db61334a15cd231d3f47365fe487a to your computer and use it in GitHub Desktop.
Save shalvah/7a0db61334a15cd231d3f47365fe487a to your computer and use it in GitHub Desktop.
Make PowerShell less like shit and more like Zsh!
# run this command as administrator in PowerShell
# this installs the 'Oh-My-Posh' module (https://github.com/pecigonzalo/Oh-My-Posh)
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Posh/master/install.ps1'))
# Add the contents of this file to your PowerShell profile
# Your powershell profile is at C:\Users\{user}\Documents\WindowsPowerShell\profile.ps1 (create it if it doesn't exist)
Import-Module "Oh-My-Posh" -DisableNameChecking -NoClobber
# Complete from history whe you type some text and press Up arrow
Set-PSReadlineKeyHandler -Chord UpArrow -Function HistorySearchBackward
# More sensible tab completion
Set-PSReadlineKeyHandler -Key Tab -Function Complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment