-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
With a structure like this:
include Cli
class To < SuperCommand
command "go-to", default: true
class GoTo < Command
def run
# ...
end
class Options
arg "where", required: true
end
end
class OtherCommand < Command
def run
# ...
end
end
class Help
header "Goes to specified location"
end
class Options
help
end
endNow if i were to run to home– instead of running "go-to" with the argument "home" as "where"; it throws the help screen screen at me. Running to alone says i need to specify the where argument.
What about making it so if a default command is set and has (required?) arguments, it checks wether whatever is passed after supercommand invoke is a subcommand or not? If it is not, pass it as an argument to the default command.
ryanprior
Metadata
Metadata
Assignees
Labels
No labels