For complex command-line apps, it's nice to be able to show some example invocations to help users know what things mean. While these could be dumped into long_desc, it's nicer to make them explicit.
This works like so:
command :list do |c|
c.example "todo list", desc: "List all tasks"
c.example "todo list --wip", desc: "List all tasks in progress"
end
And gets output like:
EXAMPLES
# List all tasks
todo list
# List all tasks in progress
todo list --wip
For complex command-line apps, it's nice to be able to show some example invocations to help users know what things mean. While these could be dumped into
long_desc
, it's nicer to make them explicit.This works like so:
And gets output like: