This module replaces the command line editing experience of PowerShell for versions 3 and up. It provides:
Syntax coloring
Simple syntax error notification
A good multi-line experience (both editing and history)
Customizable key bindings
Cmd and emacs modes (neither are fully implemented yet, but both are usable)
Many configuration options
Bash style completion (optional in Cmd mode, default in Emacs mode)
Bash/zsh style interactive history search (CTRL-R)
Emacs yank/kill ring
PowerShell token based "word" movement and kill
Undo/redo
Automatic saving of history, including sharing history across live sessions
"Menu" completion (somewhat like Intellisense, select completion with arrows) via Ctrl+Space
The "out of box" experience is meant to be very familiar to PowerShell users - there should be no need to learn any new key strokes.
PS Version: 7.3.6
PS HostName: ConsoleHost
PSReadLine Version: 2.2.6
PSReadLine EditMode: Emacs
OS: Microsoft Windows 11 Home 10.0.22621
BufferWidth: 120
BufferHeight: 900
Prerequisites
Exception report
Screenshot
fix this issue
Environment data
Steps to reproduce
$PSVersionTableto view version info.Get-Module PSReadLineand see no output or an outdated version.Expected behavior
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Actual value was -2.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable
1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
Actual behavior
behavior is very disapointe