-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Closed
Description
After #9504 we treat subcommands as commands, it's a good step, but it also introduced ambiguity, i.e. get|key is a bad command or a base command get? Maybe you will say it's a base command because get doesn't have subcommands, but it's very confused to users.
Here are some examples:
- About
COMMAND INFOcommand info config|getreturns subcommandconfig|get's info.command info get|keyreturns base commandget's info.
- About
ACL setuseracl setuser test +config|getallows user execute subcommandconfig|get.acl setuser test +config|get|dirallows user execute subcommandconfig|getwith first argdir.acl setuser test +config|xxxreturns error.acl setuser test +get|keyallows user execute base commandgetwith first argkey.acl setuser test +get|key1|key2allows user execute base commandgetwith the second argkey2,key1lost.
To me the result is very confused, I thinks we should treat get|key as a bad command, and use another character instead of | to indicate the first arg.
BTW the first-arg rule is very difficult to understand IMHO, it's too flexible.