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 auto save and restore for config options #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bulletmark
Copy link

@bulletmark bulletmark commented Feb 27, 2023

Fixes issue #232 and #339. Seems very odd to a new user that ptpython does not save the options the user sets via the nice F2 menu so this PR adds that feature.

The ptpython settings are saved at ~/.config/config.json and the ptipython settings are saved at ~/.config/ipython-config.json. Only settings that are different from default are saved and the values are pruned each time to ensure that any old config values are removed. Any config.py, if present, re-defines the user's default.

I've been careful in the way I have designed this change and to keep it very generic so please ask questions here if you think something looks odd.

@jonathanslenders
Copy link
Member

Thanks, I'll look into this soon. Maybe I'll end up cherry-picking changes from here. This is a great start.

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