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

Make it easier to diagnose why dotnet-suggest does not run the executable #1771

Open KalleOlaviNiemitalo opened 2 years ago

KalleOlaviNiemitalo commented 2 years ago

As described in https://github.com/dotnet/command-line-api/issues/1588#issuecomment-1119515147, if you register a command-line executable in one directory and then try to use tab completion via dotnet suggest on an identically-named executable in another directory, it won't work unless you register that executable separately. It is not obvious how to diagnose and fix such a problem. This could be improved in the some of the following ways:

KalleOlaviNiemitalo commented 2 years ago

I imagine you could also have a per-shell key binding that runs dotnet-suggest get with an extra option that makes it display its own command line, whether and how the command has been registered, and how it would execute the command. This feature would be harder for users to discover, though; and it might conflict with a user-defined key binding.