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

Context changes (namespace) should be commited to store files #53

Open
blut opened this issue Feb 21, 2024 · 3 comments
Open

Context changes (namespace) should be commited to store files #53

blut opened this issue Feb 21, 2024 · 3 comments

Comments

@blut
Copy link

blut commented Feb 21, 2024

Whenever I change context, the currently selected namespace is reset to the value set on import.

Ideally, the namespace would be updated in the store, so that later switches to the same context will continue in the same namespace.

This seems challenging, since we would have to commit changes to the store from a call to the current context.
Maybe this would not be interesting for everyone, so maybe make it a flag to konf namespace?

@blut
Copy link
Author

blut commented Feb 21, 2024

I think someone added a TODO in the namespace command:
image

Would you prefer to store this similarly to the latestkonf ?

@SimonTheLeg
Copy link
Owner

SimonTheLeg commented Feb 21, 2024

Hi, thanks for opening this issue. Back in the day, I came to the conclusion that it is something that every user has different preferences on. Therefore I wanted to make this configurable. However currently there is no good config mechanism in place for konf itself (apart from some global flags that you can alias).

Your issue brought up a couple of good points and I am now planning to build a config mechanism into konf and work on this topic next. Thanks for suggesting this!

@blut
Copy link
Author

blut commented Feb 22, 2024

If I remember correctly, Cobra should have a type of config / store.
However, I don't think this will solve my issue with saving my configuration per context / config

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

No branches or pull requests

2 participants