Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
86e81d0
Updated to support .NET Core 2.0.
Latency Sep 25, 2017
413c923
Code formatted.
Latency Sep 25, 2017
83def26
Revert file deletion for *.yml.
Latency Sep 25, 2017
b42ac5c
Updated libraries and targeting builds for the test projects.
Latency Sep 25, 2017
bc732fe
Updated MSBuild configuration and assembly dependancies.
Latency Sep 25, 2017
292257b
Code formatted Allman style.
Latency Oct 7, 2017
69c677e
Change indent from 2 to 4 spaces.
Latency Oct 8, 2017
9c160c7
Updated ReadLine.csproj
Latency Oct 8, 2017
97661fd
Updated target .NET Framework 4.7 to 4.7.1
Latency Dec 31, 2017
263e78a
Merge branch 'master' into master
Latency Feb 27, 2018
179c27e
Fixed compilation errors.
Latency Feb 27, 2018
aa80c94
Merge branch 'master' of https://github.com/tonerdo/readline
Latency May 7, 2018
ae9fa2d
Code format. Merge from rubberduck203 (pull request #41)
Latency May 7, 2018
bc34e00
Add build support for .NET 4.7.2
Latency May 7, 2018
4edea46
Revert expression body format style after code analyzing.
Latency May 7, 2018
b6f5bc4
Refresh unit test files from merge @ PR#41 (77c1761072df4cce910c676e…
Latency May 7, 2018
271c1bd
Merge branch 'PR#39' of https://github.com/rubberduck203/readline
Latency May 7, 2018
dadba03
Update build configurations supporting newer .NET frameworks.
Latency Sep 10, 2018
06f34a3
Merge branch 'master' into master
Latency Sep 10, 2018
beb2e96
Faster tab completion
cobbr Apr 5, 2019
4e28c48
Updated target frameworks to support VS2019.
Latency Apr 8, 2019
efef308
Merge remote-tracking branch 'Cobbr/master'
Latency Apr 8, 2019
7c9c251
Moved SRC and Test folders to root directory.
Latency Mar 18, 2020
f531195
Create dotnetcore.yml
Latency Mar 18, 2020
f734a8a
Moved SRC and Test folders to root directory.
Latency Mar 18, 2020
120c668
Moved SRC and Test folders to root directory.
Latency Mar 18, 2020
ccc6d07
Added missing member to interface IConsole.cs
Latency Mar 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 220 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,223 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
src/**/build/
tests/**/build/
bld/
[Bb]in/
[Oo]bj/
.vscode
.DS_Store
*.user
project.lock.json
packages/

# Visual Studo 2015 cache/options directory
.vs/

# Jetbrains Rider cache/options directory
.idea/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# Visual Studio preference files
*.DotSettings.user
*.csproj.user
*.vcxproj.filters

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
#*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

**/node_modules
**/node_modules/*
**/Images/ActualOutput
**/Images/ReferenceOutput

# ASP.NET 5
project.lock.json

#BenchmarkDotNet
**/BenchmarkDotNet.Artifacts/

# Build process
*.csproj.bak

# Advanced Installer
*-cache/
*-SetupFiles/

# GitHub
.github/*
Binary file added Artifacts/ReadLine.2.1.4.nupkg
Binary file not shown.
28 changes: 28 additions & 0 deletions ReadLine.Demo/AutoCompleteHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace ReadLine.Demo
{
internal class AutoCompletionHandler : IAutoCompleteHandler
{
public char[] Separators { get; set; } =
{
' ',
'.',
'/',
'\\',
':'
};


public string[] GetSuggestions(string text, int index)
{
return text.StartsWith("git ")
? new[]
{
"init",
"clone",
"pull",
"push"
}
: null;
}
}
}
33 changes: 33 additions & 0 deletions ReadLine.Demo/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;


namespace ReadLine.Demo
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("ReadLine Library Demo");
Console.WriteLine("---------------------");
Console.WriteLine();

string[] history =
{
"ls -a",
"dotnet run",
"git init"
};

IReadLine readLine = ReadLine.Instance;
readLine.AddHistory(history);

readLine.AutoCompletionHandler = new AutoCompletionHandler();

var input = readLine.Read("(prompt)> ");
Console.WriteLine(input);

input = readLine.ReadPassword("Enter Password> ");
Console.WriteLine(input);
}
}
}
2 changes: 1 addition & 1 deletion src/ReadLine.Demo/ReadLine.Demo.csproj → ReadLine.Demo/ReadLine.Demo.csproj
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>ReadLine.Demo</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
49 changes: 49 additions & 0 deletions ReadLine.Tests/Abstractions/Console2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using ReadLine.Abstractions;


namespace ReadLine.Tests.Abstractions
{
internal class Console2 : IConsole
{
public bool PasswordMode { get; set; }

public int CursorLeft { get; private set; }

public int CursorTop { get; private set; }

public int BufferWidth { get; private set; }

public int BufferHeight { get; private set; }


public Console2()
{
CursorLeft = 0;
CursorTop = 0;
BufferWidth = 100;
BufferHeight = 100;
}

public void SetBufferSize(int width, int height)
{
BufferWidth = width;
BufferHeight = height;
}

public void SetCursorPosition(int left, int top)
{
CursorLeft = left;
CursorTop = top;
}

public void Write(string value)
{
CursorLeft += value.Length;
}

public void WriteLine(string value)
{
CursorLeft += value.Length;
}
}
}
8 changes: 8 additions & 0 deletions ReadLine.Tests/AutoCompleteHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace ReadLine.Tests
{
internal class AutoCompleteHandler : IAutoCompleteHandler
{
public char[] Separators { get; set; } = { ' ', '.', '/', '\\', ':' };
public string[] GetSuggestions(string text, int index) => new[] { "World", "Angel", "Love" };
}
}
Loading