protected virtual void OnPrintAlternatives(PrintAlternativesEventArgs e) { var handler = PrintAlternatives; if (handler != null) { handler(this, e); } else { Console.WriteLine("Possible completions:"); foreach (var item in e.Alternatives) { Console.WriteLine($"- {item}"); } } }
protected virtual void OnPrintAlternatives(PrintAlternativesEventArgs e) { var handler = PrintAlternatives; if (handler != null) { handler(this, e); } else { if (CompletionPrinter != null) { CompletionPrinter(e.Alternatives); CompletionPrinter = DefaultCompletionsPrinter; } else { DefaultCompletionsPrinter(e.Alternatives); } } }
private static void ShellOnPrintAlternatives(object sender, PrintAlternativesEventArgs e) { ColorConsole.WriteLine("Possible commands: ".Cyan()); foreach (var alternative in e.Alternatives) { ColorConsole.WriteLine("- ", alternative.White()); } }