Skip to content

Instantly share code, notes, and snippets.

@larschinkel
Created November 28, 2020 06:52
Show Gist options
  • Save larschinkel/962cf6ce5fc926c30c6782e496fcbed9 to your computer and use it in GitHub Desktop.
Save larschinkel/962cf6ce5fc926c30c6782e496fcbed9 to your computer and use it in GitHub Desktop.

PowerShell


Prerequisites


Configuration


Install Windows Terminal, run as administrator & edit settings:

{
    "initialCols": 180,
    "initialRows": 42,
    "confirmCloseAllTabs": false,
    "profiles":
    {
        "defaults":
        {
            "fontFace": "Cascadia Mono PL",
        },
        "list":
        [
            {
                "name": "Windows PowerShell",
                "commandline": "powershell.exe /nologo"

Change execution policy, & install PowerShellGet:

> Set-ExecutionPolicy RemoteSigned
> Install-Module -Name PowerShellGet -Force

Restart Windows Terminal & install PSReadLine, oh-my-posh & posh-git:

> Install-Module PSReadLine -AllowPrerelease -Force
> Install-Module oh-my-posh -Scope CurrentUser
> Install-Module posh-git -Scope CurrentUser

Create Profile

> code $profil
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
Import-Module PSReadLine
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -ShowToolTips
Set-PSReadLineOption -PredictionSource History

Restart Windows Terminal & enjoy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment