command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

[Feature or Documentation Request] How to get the list of completions at runtime?

Open Lancelotbronner opened this issue 3 years ago • 1 comments

I'm making a REPL with System.CommandLine and so far it's going great. One thing missing is tab completion. Ideally I could do something like parser.GetCompletions("tic"). Is this currently possible?

It seems most of the things related to completions are internal. If it isn't currently possible, how easy would it be to work around it?

Lancelotbronner avatar Jul 27 '22 12:07 Lancelotbronner

I found out I had to parse it first which does make sense, in which case this is a documentation request for the Tab Completion page to add parser.Parse("commandline").GetCompletions().

Lancelotbronner avatar Jul 27 '22 12:07 Lancelotbronner