#
usage
Sometimes Required
Defines a usage string for the foloowing action
. When the action does not
require any arguments, this is optional.
The syntax of the provided string should follow docopt usage patterns.
title 'Developer Tools'
usage 'backup [PATH --incremental]'
option '--incremental, -i', 'Perform incremental backup only'
action 'backup' do |args|
say "Backging up #{args['PATH']}"
if args['--incremental']
say 'Performing incremental backup'
else
say 'Performing full backup'
end
end
$ run --help
Developer Tools
Usage:
run backup [PATH --incremental]
run (--help | -h)
Options:
--incremental, -i
Perform incremental backup only
--help, -h
Show this message