The setup:
- Some top level tasks
- A 'docs' submodule
- docs.build is configured to be the default task for 'docs'
- So, 'invoke docs' == 'invoke docs.build'. Either is allowed.
The question is, how should this setup display in --list? Our options:
Fab 1.x style: display both, no indication of what maps to what:
$ invoke --list top level docs docs.clean docs.build docs.browse
Super-compact style: display only the default/shorthand. Kind of meh, "hides" the "real" task name:
$ invoke --list top level docs docs.clean docs.browse
Compact style: focus on the default/shorthand, but display the "real" name alongside:
$ invoke --list top level docs (docs.build) docs.clean docs.browse
Doubled-up/highly explicit style: still show what the default maps to, but ALSO show the "real" name in-place:
$ invoke --list top level docs (docs.build) docs.clean docs.build docs.browse
Variation on either of the above two, the "alongside" display could be compacted a bit, e.g.:
$ invoke --list top level docs (.build) docs.clean docs.build docs.browse
or:
docs(.build)
or:
docs[.build]
or so forth.
Had also considered
docs (.build)
which is similar to @aaugustin'sdocs[.build]
. Originally I rejected this style because it felt not obvious enough, but it is an elegant way of displaying the information.EDIT: I'm not really a huge fan of @aaugustin's 1st example because it doesn't make it quite clear enough that
docs
by itself is a legal task identifier.EDIT 2: Added his 2nd form / my earlier version of same, to the main gist.