This adds no_params, which explicitly defines a command as taking no arguments.
Example:
command = Cri::Command.define do
name 'reset'
usage 'reset'
summary 'resets the site'
description '…'
no_params
run do |opts, args, cmd|
puts "Resetting…"
end
end
% my-tool reset x
reset: incorrect number of arguments given: expected 0, but got 1
% my-tool reset
Resetting…
%
This adds
no_params
, which explicitly defines a command as taking no arguments.Example: