-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triage: Git-style subcommands #944
Comments
@shadowspawn I recently discovered the ability to define subcommand using
It seems like explicating allowing the consumer to define the root directory path would resolve this issue: commander
.rootDir(__dirname) // fallback to bin exec path if undefined
.command('compile', 'compile source code')
OR
commander
.command('compile', 'compile source code', { scriptPath: path.resolve(__dirname, 'my-script-compile') }) Project Context
// package.json
"bin": { "run-script": "./bin/run-script" }, >> node ./bin/run-script compile
error: run-script-compile(1) does not exist, try --help
>> node scripts/my-script/run-script.js compile
**successful** |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You should probably add #828 to this. |
@holmrenser Not quite what I had in mind originally, but done. Thanks. 🙂 |
Pull Request #999 is being considered for v3, adds option to override executable file name |
Is this issue fixed now that v3 has been released? |
Around half of the referenced issues are now closed, and |
...tj/commander.js#944 due to isues with the sub-sub command imp of commander (some people say 'nested' subcommands), in particular windows filename lookup issues with the git-style imp, I'm very untempted to fix my earlier error of treating subcommands as flags, but I CAN easily namespace
This triage issue has been inactive for a while, and no longer feels to me like a call to action. The improvements to the README to make action/executable conventions clearer, the addition of Closing as suggested by @Piccirello ! |
Executable lookup
The file layout and lookup for doing subcommands is not customisable.
Issues:
Please add .command() function a path config #481 Please add .command() function a path configAllow user to specify which script a subcommand should call #532 Allow user to specify which script a subcommand should callPossible to specify executable for subcommands? #826 Possible to specify executable for subcommands?git-style sub-commands
are fetched from #875 override basePath where commands forgit-style sub-commands
are fetched fromPull Requests:
Implement specification of subcommand #854 Implement specification of subcommandLookup varies by filename/package/platform
Issues:
Sub subcommands
When subcommands are scaled up to doing sub subcommands, people want easier approaches or nicer layout.
Pull Requests:
Allow other executables
Pull Requests:
Help
Pull Requests:
Allow custom usage message to override program name for git-style sub-commands #828 Allow custom usage message to override program name for git-style sub-commandsEarly history
And where it all began...
The text was updated successfully, but these errors were encountered: