CommandLineEditors 0.2.3
See the version list below for details.
dotnet add package CommandLineEditors --version 0.2.3
NuGet\Install-Package CommandLineEditors -Version 0.2.3
<PackageReference Include="CommandLineEditors" Version="0.2.3" />
<PackageVersion Include="CommandLineEditors" Version="0.2.3" />
<PackageReference Include="CommandLineEditors" />
paket add CommandLineEditors --version 0.2.3
#r "nuget: CommandLineEditors, 0.2.3"
#:package CommandLineEditors@0.2.3
#addin nuget:?package=CommandLineEditors&version=0.2.3
#tool nuget:?package=CommandLineEditors&version=0.2.3
CommandLineEditors Library
This library provides editors for the command line that can be used as a replacement for the standard System.Console.ReadLine() method call.
Currently there is only one line-editor fully implemented, which emulates the ReadLine library, similar to a Emacs key-binding.
An early version of VI key-bindings is also in this library at the current state, but we do not recommend using this.
Quick Start
If you just want to get a replacement of the C# standard function Console.ReadLine() the ReadLineEditor is probably the best way to start with. It provides a key-binding which implements 95% of the well-known readline-libray key kindings people usually encounter on terminals in Linux.
To start with this editor, you have to add one using-statement and also create an instance of this editor, because the editor holds a history of what the user typed to make it available throught the up and down-arrow keys.
Here is a small program which repeatedly reads a single line from the console until the user enters an empty line:
using CommandLineEditors.Editor.ReadLine;
namespace CommandLineEditors.Demo
{
internal class Program
{
private static void Main(string[] args)
{
TestConsoleInput();
}
public static void TestConsoleInput()
{
ReadLineEditor readLineInterface = new ReadLineEditor();
string result = "-not-empty-to-start-with-";
while (!string.IsNullOrEmpty(result))
{
System.Console.Write("> ");
result = readLineInterface.ReadLine();
System.Console.WriteLine();
System.Console.WriteLine($"result: '{result}'");
}
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Theraot.Core (>= 3.2.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.0 | 90 | 2/28/2026 |
| 0.3.6 | 288 | 3/27/2024 |
| 0.3.5 | 210 | 3/26/2024 |
| 0.3.4 | 239 | 3/18/2024 |
| 0.3.3 | 194 | 3/18/2024 |
| 0.3.2 | 206 | 3/18/2024 |
| 0.3.0 | 207 | 3/15/2024 |
| 0.2.6 | 211 | 3/15/2024 |
| 0.2.5 | 201 | 3/14/2024 |
| 0.2.3 | 471 | 1/2/2022 |
| 0.2.2 | 425 | 1/2/2022 |
| 0.2.1 | 469 | 1/2/2022 |
| 0.2.0 | 446 | 12/30/2021 |
| 0.1.0 | 514 | 8/30/2021 |