Open blut opened 9 months ago
I think someone added a TODO in the namespace command:
Would you prefer to store this similarly to the latestkonf
?
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!
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
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
?