Skip to main content
Three essential PowerShell modules enhance your terminal experience: PSReadLine for intelligent command-line editing, PSFzf for fuzzy finding, and Terminal-Icons for file type icons.

Installation

Install all three modules from the PowerShell Gallery:
# PSReadLine - Enhanced command line editing (usually pre-installed, update to latest)
Install-Module -Name PSReadLine -Force -SkipPublisherCheck

# PSFzf - FZF integration for PowerShell
Install-Module -Name PSFzf -Force

# Terminal-Icons - File/folder icons in terminal
Install-Module -Name Terminal-Icons -Force

Verify Installation

Get-Module -ListAvailable -Name PSReadLine, PSFzf, Terminal-Icons

PSReadLine Configuration

PSReadLine provides advanced command-line editing features including history search, predictive IntelliSense, and custom key bindings.

Basic Setup

Add to conf.d/00-init.ps1:
# Core PowerShell settings and PSReadLine configuration

# Powershell to UTF-8
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

if (Get-Module -ListAvailable -Name PSReadLine) {
    Import-Module PSReadLine

    # Edit mode
    Set-PSReadLineOption -EditMode Emacs
    Set-PSReadLineOption -BellStyle None
    Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar

    # History search with arrow keys
    Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
    Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

    # Predictive IntelliSense
    try {
        Set-PSReadLineOption -PredictionSource HistoryAndPlugin -ErrorAction Stop
        Set-PSReadLineOption -PredictionViewStyle ListView -ErrorAction Stop
        
        # Colors for predictions (Vesper-inspired)
        Set-PSReadLineOption -Colors @{
            InlinePrediction = '#505050'
        } -ErrorAction SilentlyContinue
    } catch {
        # Fallback for non-interactive or unsupported terminals
        Set-PSReadLineOption -PredictionSource History -ErrorAction SilentlyContinue
    }

    # Better history
    Set-PSReadLineOption -HistorySearchCursorMovesToEnd
    Set-PSReadLineOption -MaximumHistoryCount 10000
}

Key Features

PowerShell predicts commands based on your history and available plugins, displaying suggestions as you type.
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle ListView
Toggle between ListView and InlineView based on preference.
Customize colors to match the Vesper theme:
Set-PSReadLineOption -Colors @{
    InlinePrediction = '#505050'
    Command = '#FFC799'
    Parameter = '#FFCFA8'
    Operator = '#B7B7B7'
    Variable = '#99FFE4'
    String = '#99FFE4'
    Number = '#FFC799'
    Type = '#FFCFA8'
    Comment = '#505050'
}

PSFzf Integration

PSFzf brings fuzzy finding capabilities directly into PowerShell with deep integration for command history and file navigation.

Configuration

Add to conf.d/30-tools.ps1:
# --- PSFzf Integration ---
if (Get-Module -ListAvailable -Name PSFzf) {
    Import-Module PSFzf
    
    # Set keybindings
    Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
    
    # Enable Alt+C for directory navigation
    Set-PSReadLineKeyHandler -Key Alt+c -ScriptBlock {
        $result = fd --type d --hidden --follow --exclude .git | fzf
        if ($result) {
            Set-Location $result
            [Microsoft.PowerShell.PSConsoleReadLine]::InvokePrompt()
        }
    }
}

Key Bindings

KeybindingFunctionDescription
Ctrl+RHistory SearchFuzzy search through command history
Ctrl+TFile PickerSelect files with preview
Alt+CDirectory PickerNavigate to directories

Advanced Options

# File preview with bat
$env:FZF_CTRL_T_OPTS = "--preview 'bat --style=numbers --color=always --line-range :300 {}'"

# Directory preview with eza
$env:FZF_ALT_C_OPTS = "--preview 'eza --tree --level=2 --icons --color=always {}'"

Terminal-Icons

Terminal-Icons adds file and folder icons to directory listings, making it easier to identify file types at a glance.

Setup

Add to conf.d/00-init.ps1:
# --- Terminal Icons ---
if (Get-Module -ListAvailable -Name Terminal-Icons) {
    Import-Module Terminal-Icons
}
Terminal-Icons requires a Nerd Font to display icons correctly. Install JetBrains Mono Nerd Font with:
scoop install nerd-fonts/JetBrainsMono-NF

Icon Customization

You can customize which icons appear for specific file types:
# Get current theme
$theme = Get-TerminalIconsTheme

# Modify specific file type
$theme.Types.Directories['.git'].Icon = ''

# Apply custom theme
Set-TerminalIconsTheme -ColorTheme $theme

Troubleshooting

Ensure you’re running PowerShell 7+ and the module is up to date:
$PSVersionTable.PSVersion
Update-Module PSReadLine -Force
  1. Install a Nerd Font: scoop install nerd-fonts/JetBrainsMono-NF
  2. Configure your terminal to use the Nerd Font
  3. Restart your terminal
Verify PSFzf is loaded and fzf is installed:
Get-Module PSFzf
Get-Command fzf
If missing, reinstall:
scoop install fzf
Install-Module PSFzf -Force

Build docs developers (and LLMs) love