dotnet / command-line-api

Command line parsing, invocation, and rendering of terminal output.
https://github.com/dotnet/command-line-api/wiki
MIT License
3.37k stars 378 forks source link

Feature request: Match commands by prefix #735

Open alexrp opened 4 years ago

alexrp commented 4 years ago

Many interactive programs will match commands by prefix. In GDB for example, dis, disas, disassem, etc are all equivalent to disassemble. Having an out-of-the-box option that could enable this command matching behavior would make the experience of using System.CommandLine for such scenarios much smoother. I imagine it could be implemented as a middleware function.

jonsequitur commented 4 years ago

We discussed this at one point and I think it would be very useful, but complex enough that we didn't take it on.

Some thoughts:

All that is to say that I think this can be done and would be a good feature but we'd need to think through whether the previous design decisions allow it. If we can't figure that out, it might be a worthwhile area to direct our usability study, to determine whether we made the right call.

@KathleenDollard