mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-01 18:38:16 +08:00
Show help for default command (#953)
Shows help if the default command was called without any arguments but has required arguments. This way it does not hinder execution of a default command without any required arguments. When called without args: - Default command with required params -> Show help - Default command with required params and additional commands -> Show help including additional commands - Default command without required params -> Execute command
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
DESCRIPTION:
|
||||
The lion command.
|
||||
|
||||
USAGE:
|
||||
myapp <TEETH> [LEGS] [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<TEETH> The number of teeth the lion has
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
-n, --name <VALUE>
|
||||
--agility <VALUE> The agility between 0 and 100
|
||||
-c <CHILDREN> The number of children the lion has
|
@ -0,0 +1,19 @@
|
||||
DESCRIPTION:
|
||||
The lion command.
|
||||
|
||||
USAGE:
|
||||
myapp <TEETH> [LEGS] [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<TEETH> The number of teeth the lion has
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
-n, --name <VALUE>
|
||||
--agility <VALUE> The agility between 0 and 100
|
||||
-c <CHILDREN> The number of children the lion has
|
||||
|
||||
COMMANDS:
|
||||
giraffe <LENGTH> The giraffe command
|
@ -0,0 +1 @@
|
||||
Hello World
|
Reference in New Issue
Block a user