You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have an "Advanced" command category, you often want that category to appear last in --help. However, it will be alphabetized first.
It would be nice to offer a way to explicitly order command categories and, when #35 is implemented, option categories.
For command categories, perhaps cli.orderCategories([array of category names]) is sufficient.
For option categories, we could accept a similar array on the Usage object, or we could accept an option new Cli({alphabetizeOptions: false}) and document categories in the order they are declared on a command, similar to how positionals are ordered based on declaration order.
The text was updated successfully, but these errors were encountered:
Thinking out loud, the orderCategories option feels more obvious and straightforward. The array can be declared once, then imported anywhere it is needed.
import {Categories} from './core';
class Foo extends Command {
static usage: Usage = {
categories // name it "categories" instead of "orderCategories" to be terser?
}
}
When you have an "Advanced" command category, you often want that category to appear last in
--help
. However, it will be alphabetized first.It would be nice to offer a way to explicitly order command categories and, when #35 is implemented, option categories.
For command categories, perhaps
cli.orderCategories([array of category names])
is sufficient.For option categories, we could accept a similar array on the
Usage
object, or we could accept an optionnew Cli({alphabetizeOptions: false})
and document categories in the order they are declared on a command, similar to how positionals are ordered based on declaration order.The text was updated successfully, but these errors were encountered: