"Add nested subcommand feature"
Bug #1290018 reported by
Rahul Ranjan
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
current version of cliff support subcommands but the framework doesn't provide standard way of doing it.
like if we want to add subcommand having structure as below
[GLOBAL OPTIONS] [{SUB1 [options]}, {SUB2 [options]}, ...... ]
then we have to tweak the command manager class which is painful for every app. So there should be a generic framework for doing it.
To post a comment you must log in.
I'm not sure I understand the goal. Do you mean that one command is the parent of another, and provides some options that the other uses? That can be done with a base class for the commands. You don't end up with the syntax you describe, but I'm not sure that syntax is necessary to achieve what you want.
Can you give a more concrete example of what those sub1 and sub2 commands might look like?