Skip to content

Add copyInheritedSettings#1557

Merged
shadowspawn merged 5 commits intotj:developfrom
shadowspawn:feature/copy-settings
Jul 3, 2021
Merged

Add copyInheritedSettings#1557
shadowspawn merged 5 commits intotj:developfrom
shadowspawn:feature/copy-settings

Conversation

@shadowspawn
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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