Skip to content
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

Add copyInheritedSettings #1557

Merged
merged 5 commits into from
Jul 3, 2021
Merged

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

Problem

Adding a subcommand using .command() implicitly copies a bunch of inherited settings from the parent command to the subcommand. There is not currently any public way to transfer inherited settings, say if using .addCommand(), and many are not accessible using public routines or properties.

Related: #1186 #1185 (comment)

Solution

Add .copyInheritedSettings() so available for explicit use, particularly if using `.addCommand()'.

Adding for completeness, and not planning to add this to README for now. Has not come up in issues so far.

ChangeLog

  • add .copyInheritedSettings()

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Jul 3, 2021
@shadowspawn shadowspawn merged commit 5517d25 into tj:develop Jul 3, 2021
@shadowspawn shadowspawn deleted the feature/copy-settings branch July 3, 2021 22:38
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Jul 27, 2021
@shadowspawn
Copy link
Collaborator Author

Released in Commander v8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants