-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hi,
First, thanks for this awesome package 🎉
I was wondering if there's a way to customize the command signature in a way other than by just modifying its name. In some applications, you might prefer to create a command like ./minicli make:something
, but I think that's not possible right now.
Another case could be adding hyphens in the command name. Currently, a command with multiple words results in a single stacked word. For example, if I want to create a PostTypeController, I would prefer to have ./minicli post-type
instead of ./minicli posttype
After checking the documentation and some of the code, I don't believe there is a way to do that, am I correct ?
If so, do you think this could be a good enhancement ?
Looking at Laravel Artisan for example, there is a protected property "signature" in the command class that allow to overwrite the default name.
By default it can stay auto-generated from the classname, but it could be overwritten if the property is set for the current command or subcommand.
Here's an example with my post type example :
class PostTypeController extends CommandController {
protected static ?string $signature = 'post-type';
}
And this will result of the command name changed from posttype
to post-type
only for the current scope.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status