★ wanayoo — archive 1999 https://github.com/python-cmd2/cmd2/issues/965Nouvelle recherche | Portail wanayoo
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

Allow CommandSets to have their own user-settable settings #965

Open
kmvanbrunt opened this issue Aug 4, 2020 · 1 comment
Open

Allow CommandSets to have their own user-settable settings #965

kmvanbrunt opened this issue Aug 4, 2020 · 1 comment
Labels

Comments

@kmvanbrunt
Copy link
Member

@kmvanbrunt kmvanbrunt commented Aug 4, 2020

Currently do_set is limited to attributes of cmd2.Cmd classes. Make it possible for attributes of CommandSet to also be settable.

@anselor
Copy link
Contributor

@anselor anselor commented Sep 9, 2020

Started some work on the cmdset_settables branch which allows additional Settables to be added to cmd2. The issue is tracking settables added by a CommandSet to make sure they're unregistered when the CommandSet is unregistered.

Probably going to take a new direction and have each CommandSet manage its own dictionary of settables. Cmd2 will search first the cmd2 dictionary, then the CommandSets. This way settables always have a lifetime linked to the CommandSet it's registered in. This does add the problem of potential duplicate names - which will be something the developer will have to be mindful of.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.