Setting up zoxide in PowerShell (pwsh)

  1. Install zoxide If you use Scoop:

    scoop install zoxide
    

    Or place the binary in a custom directory, e.g. C:\Users\David.Wei\bin.

  2. Add zoxide to PATH (if not already)

    [Environment]::SetEnvironmentVariable(
        "Path",
        $env:Path + ";C:\Users\David.Wei\bin",
        "User"
    )
    
  3. Initialize zoxide in PowerShell profile Find or create your profile:

    New-Item -ItemType File -Path $PROFILE -Force
    

    Edit it and add:

    Invoke-Expression (& { (zoxide init powershell --cmd j | Out-String) })
    
  4. Restart PowerShell Use j <dir> to jump quickly between directories.

That’s all.

Comments

  1. Markdown is allowed. HTML tags allowed: <strong>, <em>, <blockquote>, <code>, <pre>, <a>.