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

make kdb get output original values #2724

Open
kodebach opened this issue May 26, 2019 · 3 comments

Comments

2 participants
@kodebach
Copy link
Contributor

commented May 26, 2019

If for example the type plugin is used, boolean keys with values like true, disabled etc. will be transformed to either 0 or 1 on kdbGet. This also means that kdb get ... will always print 0 or 1.

It would be more user friendly, if instead kdb get would print the stored value. This could be done by checking for the origvalue metakey. If it is present, we would print that metavalue instead of the actual key value.

@markus2330

This comment has been minimized.

Copy link
Contributor

commented May 26, 2019

I wholeheartedly agree! I was thinking this already in #2621, where we now use decimal numbers (to be compatible with expectations of high-level API and applications). But for users it makes much more sense to show the value as in the config file, which is much easier to read.

I would, however, propose to make this an option or to even introduce a "oget" to get original values. kdb get should return exactly what applications get.

@kodebach

This comment has been minimized.

Copy link
Contributor Author

commented May 26, 2019

kdb get should return exactly what applications get.

I think the kdb tool should foremost serve users and admins using elektrified applications. Users/admins don't care about what values the applications use internally. As a user or admin (not developer using Elektra), I would actually expect that kdb get returns the value I set via kdb set.

Developers would probably be fine with using an option (e.g. -v) or a separate version of kdb get to find out what happens internally.

@markus2330

This comment has been minimized.

Copy link
Contributor

commented May 26, 2019

Yes, we can also make it the other way round (option for returning the value even if the origvalue is present). I agree with you that people expect that they get what they set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.