dotnet / dotnet/command-line-api
Add suggestion support to dotnet complete
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
Rather than having a separate `dotnet suggest` tool, please consider adding support to `dotnet complete`. Right now, the latter seems rather specific to built-in tools, but `complete` could fall back to what `dotnet suggest` does.
The reason is that adding autocompletion support using yet another tool that has to even execute code to figure out the tools is expensive. It's also possibly incorrect. For example, any "dotnet-mytool" can be invoked as "dotnet mytool", so the current suggestion snippet to add to `$profile`, .bashrc, etc., won't work in all cases. The execution can slow down startup as well.
Instead, `dotnet complete` just needs to register suggestions for `dotnet`. IT may not work for installed tools that don't preface themselves with "dotnet-", but how many are those (all but 1 I have installed use that prefix).
This also wouldn't have to replace `dotnet suggest`, but would still account for most cases such that people may not want to register completions for `dotnet suggest`.
Contributor guide
Assessment
This issue has not been assessed yet.