Minor cli edits and fix potential deadlock

This commit is contained in:
Mbucari 2023-07-02 16:42:45 -06:00
parent 29803c6ba0
commit 3be7d8e825
6 changed files with 27 additions and 26 deletions

View file

@ -10,7 +10,7 @@ namespace LibationCli.Options
[Verb("search", HelpText = "Search for books in your library")]
internal class SearchOptions : OptionsBase
{
[Value(0, MetaName = "query", Required = true, HelpText = "Lucene query test to search")]
[Value(0, MetaName = "query", Required = true, HelpText = "Lucene search string")]
public IEnumerable<string> Query { get; set; }
protected override Task ProcessAsync()
@ -31,7 +31,7 @@ namespace LibationCli.Options
if (waitForNextBatch)
{
Console.Write(nextPrompt);
waitForNextBatch = Console.ReadKey().Key != ConsoleKey.Escape;
waitForNextBatch = Console.ReadKey(intercept: true).Key != ConsoleKey.Escape;
ReplaceConsoleText(Console.Out, nextPrompt.Length, "");
Console.SetCursorPosition(0, Console.CursorTop);
}