-
Notifications
You must be signed in to change notification settings - Fork 19
|
For example,
This could just be a boolean
Shall we specify that |
All reactions
Replies: 1 comment 2 replies
Yes, that sounds reasonable to be able to specify a default command.
The question is whether it's possible to specify it so it can only be done once.
Maybe on the document level? Could be an array of commands, such as defaultCommand: ["bundle", "install"]?
All reactions
The question is whether it's possible to specify it so it can only be done once.
Yeah, I think so!
But maybe not on Document — since a multi-cli might have several default subcommands in various paths. For example,
git remote->git remote showgit stash->git stash save
What if Command (including the root command) has a field defaultCommand that's a string instead of an array?
You'd express the git example like this:
{ "name": "git", // pseudo: depends on where we land with #70 "commands": [ { "name": "remote", "defaultCommand": "show", "commands:": [ { "name": "show", // ... } ] }, { "name": "stash", "defaultCommand": "save", "commands:": [ { "name": "save", // ... } ] }, // ... ] }
All reactions
@patriksvensson, is my answer acceptable to you? If so, I'd love to land this change.