Skip to content

Commit

Permalink
Merge pull request #19 from NeilMacMullen/improve-help
Browse files Browse the repository at this point in the history
Improve help command by generating all output before rendering
  • Loading branch information
NeilMacMullen authored May 19, 2024
2 parents 923830e + ef72e3a commit ad9e2dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/lokql-engine/InteractiveTableExplorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ public void SetWorkingPaths(string containingFolder)

#region internal commands

private Task RunInternalCommand(string[] args)
private async Task RunInternalCommand(string[] args)
{
var textWriter = new ConsoleTextWriter(_outputConsole);
return StandardParsers.CreateWithHelpWriter(textWriter)
var textWriter = new StringWriter();
await StandardParsers.CreateWithHelpWriter(textWriter)
.ParseArguments(args,
typeof(ExitCommand.Options),
typeof(SaveCommand.Options),
Expand Down Expand Up @@ -245,6 +245,7 @@ private Task RunInternalCommand(string[] args)
.WithParsedAsync<ListSettingDefinitionsCommand.Options>(o =>
ListSettingDefinitionsCommand.RunAsync(this, o))
;
_outputConsole.Info(textWriter.ToString());
}


Expand Down

0 comments on commit ad9e2dc

Please sign in to comment.