I'd like to create a CLI tool which has commands in a format something like this:
clitool jobs execute some-job --arg1 value --arg2 another_value
Is it possible to have a subcommand of a subcommand within Thor? I would also like to preserve the class_options that I have defined in the class for the clitool jobs execute subcommand for any other subcommands under execute.
I have successfully used subcommands of subcommands, although there is a small bug. I haven't tried preserving class_options for subcommands, so I don't have an answer for that.
For nested subcommands, the following works:
This seems to do what you want:
There appears to be a bug: the help text for subcommands of subcommands doesn't work properly:
The last help text should show "clitool jobs execute some_job...", but the prefix
jobsgets omitted. Perhaps there's a guru out there who can show me how to correct that.