# powershell/psreadline

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/powershell-psreadline).**

4,306 stars · 326 forks · C# · BSD-2-Clause

## Links

- GitHub: https://github.com/PowerShell/PSReadLine
- awesome-repositories: https://awesome-repositories.com/repository/powershell-psreadline.md

## Description

PSReadLine is a command line editor, completion engine, history manager, and syntax highlighter for the PowerShell console. It provides a bash-inspired line editing experience that enables advanced cursor movement and text manipulation within the terminal.

The project features a customizable input mapper for assigning keyboard shortcuts to specific actions and navigation logic. It includes a completion system that suggests matching commands through selectable menus or prefix-based matching.

The tool covers real-time color coding for command text and error notifications to improve readability. It manages the automatic persistence and retrieval of command history, allowing for interactive searching and filtering of previous entries. It also supports multi-line input editing and token-based cursor navigation.

## Tags

### Operating Systems & Systems Programming

- [Console Experience Enhancements](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/shells-scripting/powershell/console-experience-enhancements.md) — Enhances the interactive PowerShell console experience with advanced text editing and real-time visual feedback.
- [Keyboard Shortcut Mappings](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/terminal-interface-systems/terminal-emulation/configuration-workflow-tools/keyboard-shortcut-mappings.md) — Allows users to map specific operations and navigation logic to custom keyboard shortcuts within the terminal.

### Part of an Awesome List

- [Trie-Based Completions](https://awesome-repositories.com/f/awesome-lists/devtools/search-libraries/auto-complete-libraries/trie-based-completions.md) — Utilizes trie data structures for efficient prefix matching to provide command completion suggestions.

### Development Tools & Productivity

- [Line Editing Controls](https://awesome-repositories.com/f/development-tools-productivity/code-editors-ides/extension-ecosystems-management/editor-ide-extensions/text-and-block-manipulation-tools/line-editing-controls.md) — Implements advanced cursor movement, token-based navigation, and undo/redo capabilities for a bash-inspired line editing experience. ([source](https://github.com/powershell/psreadline#readme))
- [Command History Managers](https://awesome-repositories.com/f/development-tools-productivity/command-history-managers.md) — Provides a dedicated manager for automatically saving and interactively searching past PowerShell command entries.
- [Command Line Editors](https://awesome-repositories.com/f/development-tools-productivity/command-line-editors.md) — Implements a bash-inspired line editor for the PowerShell console with advanced cursor movement and text manipulation.
- [Command-Line Input Completions](https://awesome-repositories.com/f/development-tools-productivity/custom-completion-providers/completion-frameworks/input-pattern-completions/command-line-input-completions.md) — Ships a real-time suggestion engine for PowerShell command-line inputs using selectable menus and prefix matching.
- [Custom Key Mappings](https://awesome-repositories.com/f/development-tools-productivity/custom-key-mappings.md) — Provides a system for defining custom keyboard shortcuts to personalize console navigation and command execution. ([source](https://github.com/powershell/psreadline#readme))
- [Command Key Bindings](https://awesome-repositories.com/f/development-tools-productivity/input-binding-libraries/command-key-bindings.md) — Features a customizable mapper that associates keyboard shortcuts with internal editor functions and navigation logic.
- [Regex-Based Syntax Highlighting](https://awesome-repositories.com/f/development-tools-productivity/regex-based-syntax-highlighting.md) — Uses regular expressions to analyze the input buffer and apply real-time color coding to keywords and operators.
- [Terminal Syntax Highlighters](https://awesome-repositories.com/f/development-tools-productivity/terminal-syntax-highlighters.md) — Applies real-time color coding and error notifications to command text within the terminal environment.
- [Command History Tools](https://awesome-repositories.com/f/development-tools-productivity/command-history-tools.md) — Includes utilities for tracking, managing, and searching through the history of executed console commands.
- [Word-Boundary Navigation](https://awesome-repositories.com/f/development-tools-productivity/markup-boundary-navigation/word-boundary-navigation.md) — Implements cursor navigation logic that identifies language-specific word boundaries rather than simple character offsets.
- [Multi-line Editing](https://awesome-repositories.com/f/development-tools-productivity/multi-line-editing.md) — Provides a bash-inspired input system capable of handling commands that span multiple lines. ([source](https://github.com/powershell/psreadline#readme))

### Programming Languages & Runtimes

- [Input Event Bindings](https://awesome-repositories.com/f/programming-languages-runtimes/input-key-mappings/configurable-key-to-command-mappings/input-event-bindings.md) — Implements a configurable mapping system that links keyboard events to specific internal shell commands and actions.

### System Administration & Monitoring

- [Command History Persistence](https://awesome-repositories.com/f/system-administration-monitoring/request-history-persistence/command-history-persistence.md) — Provides disk-based storage of user-entered commands to maintain history across different PowerShell sessions.
- [Interactive History Navigators](https://awesome-repositories.com/f/system-administration-monitoring/request-history-persistence/command-history-persistence/interactive-history-navigators.md) — Enables interactive recall and searching of persisted command history via keyboard shortcuts during a session. ([source](https://github.com/powershell/psreadline#readme))

### User Interface & Experience

- [Code Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/code-syntax-highlighting.md) — Applies real-time visual formatting and colors to command text based on PowerShell syntax rules.
- [Text Buffer Management](https://awesome-repositories.com/f/user-interface-experience/input-state-managers/text-buffer-management.md) — Maintains an in-memory representation of the current input line to support multi-line editing and undo operations.
- [Syntax Highlighters](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters.md) — Provides real-time color coding for command text and error notifications to improve console readability. ([source](https://github.com/powershell/psreadline#readme))
