Skip to content

Enhance Console.ReadLine() to return at Tab #800

Description

@iSazonov

AB#1115512
On Windows PowerShell implements tab completions in command line (without PSReadline).
https://github.com/PowerShell/PowerShell/blob/0f7efddd22a4a44f61a2f22de86f5d6b6aa47564/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs#L753

On Unix PowerShell can not do this because Console API doesn't support read line complete when the Tab button is pressed.
https://github.com/dotnet/corefx/blob/a10890f4ffe0fadf090c922578ba0e606ebdd16c/src/System.Console/src/System/IO/StdInReader.cs#L149

Once feature request is implemented, in PowerShell repo we can use the same code on all systems, enhance supported features on Unix and remove explicit P/Invokes.

Feature request

Enhance Console API so that Console.ReadLine() works like Windows ReadConsole:

  • can returns when the Tab (others?) button is pressed.
  • accepts InitialChars such as Windows ReadConsole.

Additional

Bash benefits from Readline library https://en.wikipedia.org/wiki/GNU_Readline

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions