Skip to content

Releases: memoryapi/PSReadLine

v3.0.0-fuzzy-highlight

30 Apr 18:55

Choose a tag to compare

Overview

This release introduces real-time syntax highlighting for command validation, inspired by the fish shell.

Key Improvements:

  • Invalid Command Highlighting: Commands that do not exist in the current session or $env:PATH are highlighted in Red by default.
  • Asynchronous Validation: Logic is offloaded to a background thread (ThreadPool) to prevent UI lag or typing latency.
  • Smart Caching: Includes a ConcurrentDictionary cache to store validation results, which is automatically cleared upon AcceptLine to handle new environment changes.
  • Thread Safety: Implemented via AutoResetEvent signaling to trigger re-renders only when background validation completes.

How to use:

You can customize the color in your $PROFILE using:

Set-PSReadLineOption -Colors @{ InvalidCommand = 'Red' }

v3.1.1-enhanced

12 May 14:44
2984546

Choose a tag to compare

Overview

This release further enhances the PSReadLine experience by introducing a fully interactive, paged completion menu inspired by the fish shell. This replaces the disruptive y/n prompt with a seamless, navigable UI.

Key Features

Feature Configuration Description
Interactive Completion Menu Ctrl + Space (Default) A paged menu that replaces the old static list. Supports two layouts: Grid for paths/files and Description (inline tooltips) for command flags.
Invalid Command Highlighting Set-PSReadLineOption -Colors @{ InvalidCommand = 'Red' } Unrecognized commands turn red in real-time. Validation is handled on a background thread for maximum performance.
Fuzzy Substring Search Set-PSReadLineOption -HistorySearchFuzzy Enhances HistorySearchBackward (UpArrow) to match search terms anywhere in the command history.

The New Completion Menu

The menu automatically adapts its layout based on the content:

  • Grid Mode: Compact multi-column view for file paths and simple lists.
  • Description Mode: Single-column view with inline parameter descriptions (requires Set-PSReadLineOption -ShowToolTips).
  • Smart Paging: If the results exceed your terminal height, the menu pages automatically. Use arrow keys or Page Up/Down to navigate.

Installation

Important

This custom build must be placed in your user module folder to take priority over the built-in version.

Quick Install (PowerShell):

$tag="v3.1.1-enhanced"; $url="https://github.com/memoryapi/PSReadLine/releases/download/$tag/PSReadLine.zip"; $zip="$env:TEMP/psl.zip"; $dest="$HOME/Documents/PowerShell/Modules"; if($IsLinux){$dest="$HOME/.local/share/powershell/Modules"}; iwr $url -OutFile $zip; Expand-Archive $zip -DestinationPath $dest -Force

Manual Installation:

  1. Download PSReadLine.zip from the assets below.
  2. Extract to Documents\PowerShell\Modules (Windows) or ~/.local/share/powershell/Modules (Linux).
  3. Restart PowerShell.

Configuration Example

Add this to your $PROFILE for the complete experience:

# Enable new features
Set-PSReadLineOption -HistorySearchFuzzy
Set-PSReadLineOption -ShowToolTips  # Essential for inline menu descriptions
Set-PSReadLineOption -Colors @{ 
    InvalidCommand = 'Red' 
    Emphasis = "`e[48;2;49;50;68m" # Fish-style background highlight
}

# Keybindings
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete # Optional: Use Tab for the menu
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

Full Changelog: v3.1.0-enhanced...v3.1.1-enhanced

v3.1.0-enhanced

01 May 12:02
2984546

Choose a tag to compare

Overview

This release transforms the PowerShell editing experience by porting core fish shell behaviors directly into the PSReadLine engine.

Key Features

Feature Configuration Description
Invalid Command Highlighting Set-PSReadLineOption -Colors @{ InvalidCommand = 'Red' } Unrecognized commands turn red in real-time. Validation is handled on a background thread to ensure zero typing lag.
Fuzzy Substring Search Set-PSReadLineOption -HistorySearchFuzzy Changes HistorySearchBackward (UpArrow) to match your search term anywhere in the command history, not just the start.

Installation

Important

Since PowerShell includes a built-in version of PSReadLine, this custom build must be placed in your user module folder to take priority.

Quick Install (PowerShell):
Copy and paste this into your shell to download and install automatically:

$tag="v3.1.0-enhanced"; $url="https://github.com/memoryapi/PSReadLine/releases/download/$tag/PSReadLine.zip"; $zip="$env:TEMP/psl.zip"; $dest="$HOME/Documents/PowerShell/Modules"; if($IsLinux){$dest="$HOME/.local/share/powershell/Modules"}; iwr $url -OutFile $zip; Expand-Archive $zip -DestinationPath $dest -Force

Manual Installation:

  1. Download PSReadLine.zip from the assets below.
  2. Extract the contents to:
    • Windows: Documents\PowerShell\Modules
    • Linux: ~/.local/share/powershell/Modules
  3. Restart PowerShell.
  4. Verify with: Get-Module PSReadLine | Select-Object Version, Path

Configuration Example

Add this to your $PROFILE to get the full fish experience:

# Enable the new features
Set-PSReadLineOption -HistorySearchFuzzy
Set-PSReadLineOption -Colors @{ 
    InvalidCommand = 'Red' 
    Emphasis = "`e[48;2;49;50;68m" # Fish-style background search highlight
}

# Bind arrows to the new fuzzy functions
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

Full Changelog: v3.0.0-fuzzy-highlight...v3.1.0-enhanced