Enabling Command Line Completions with dotnet-suggest
I recently removed the hand-written command line parser from C# REPL and replaced it with the more standard System.CommandLine NuGet package. As part of this, it gained dotnet-suggest support. I couldn’t find much online discussion about dotnet-suggest, so I’m jotting down some notes here.
There are two parts to dotnet-suggest:
- As an end-user, we configure our shell to enable dotnet-suggest shell completions.
- As a developer, we use System.CommandLine to provide rich completions to our end users.
We’ll be covering both parts in this blog post, as well as how it all works under the hood. At the end, we’ll look at an interesting way all this functionality is …continue.