CommandLineUtils
CommandLineUtils copied to clipboard
Documentation is incomplete for CommandAttribute
Describe the bug Documentation is missing as to how the highest level CommandAttribute is being used.
To Reproduce Steps to reproduce the behavior:
- Clone code
- Notice that this line mentions the command "fake-docker":
[Command(Name = "fake-docker", Description = "A self-sufficient runtime for containers"), ...]
- Build all
- Try to figure out how "fake-docker" is used.
Expected behavior
Not sure, is "fake-docker" supposed to be the app name? A sub-command? Or should it not be there?
Actual behavior
.build
directory doesn't contain anything named fake-docker
dotnet .\NestedTypeSubcommands.dll fake-docker
results in the error:
Unrecognized command or argument 'fake-docker'
It's used in help text generation. Try running the sample with --help
and you should see it mentioned there. The value is meant to match the name of the .exe for your app. I suppose the samples should be updated to indicate this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project.
I still don't see where fake-docker
is used? It seems like it is defined for no reason.
All commands with fake-docker
fail:
❯ dotnet .\NestedTypeSubcommands.dll fake-docker Specify --help for a list of available options and commands. Unrecognized command or argument 'fake-docker' ❯ dotnet .\NestedTypeSubcommands.dll fake-docker --help Specify --help for a list of available options and commands. Unrecognized command or argument 'fake-docker' ❯ dotnet .\NestedTypeSubcommands.dll fake-docker image --help Specify --help for a list of available options and commands. Unrecognized command or argument 'fake-docker'
What does work is to ignore the fake-docker
command:
❯ dotnet .\NestedTypeSubcommands.dll --help A self-sufficient runtime for containers
Usage: fake-docker [command] [options]
Options: -?|-h|--help Show help information.
Commands: containers Manage containers image Manage images
Run 'fake-docker [command] -?|-h|--help' for more information about a command.
❯ dotnet .\NestedTypeSubcommands.dll image --help Manage images
Usage: fake-docker image [command] [options]
Options: -?|-h|--help Show help information.
Commands: ls List images
Run 'image [command] -?|-h|--help' for more information about a command.
There is also no exe named fake-docker
.
So again, what is the point of defining fake-docker
if it's not used anywhere?
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project.
Closing due to inactivity. If you are looking at this issue in the future and think it should be reopened, please make a commented here and mention natemcmaster so he sees the notification.