Skip to content

javaworld #4802

@shivam-804912

Description

@shivam-804912

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

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.

Screenshot

fix this issue

Environment data

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

Steps to reproduce

  1. Open PowerShell (Windows Terminal).
  2. Run the command: $PSVersionTable to view version info.
  3. Notice that PSReadLine is not loading or auto-completion fails.
  4. Try running: Get-Module PSReadLine and see no output or an outdated version.
  5. Issue occurs after upgrading PowerShell to 7.3.6.

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(Nullable1 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions