simplenetes
simplenetes copied to clipboard
Consider outputting help for a specific context when command is empty
Given the following command:
sns CONTEXT
Current output:
[ERROR] Unknown <CONTEXT> command ''
Suggested output:
Usage:
help
-h
Output this help
version
-V
Output the version of Simplenetes
sns CONTEXT COMMAND [OBJECT] [OPTIONS] [ARGUMENTS]
Cluster commands:
cluster create <cluster name>
[...]
Host commands:
host register <host>
[...]
Pod commands:
pod ls [[pod[:version]][@host]]
[...]
Or just that particular <CONTEXT> help usage. Example:
sns host
Targetted output:
sns host COMMAND [OBJECT] [OPTIONS] [ARGUMENTS]
Host commands:
host register <host>
[...]
Could also consider applying the same to invalid commands, but that is more understandable as it is (in comparison to the case of empty commands). Invalid command:
sns CONTEXT invalid
Current output:
[ERROR] Unknown <CONTEXT> command 'invalid'