Elektra  0.8.26
Plugin: boolean

Different configurations might use different values for TRUE/FALSE. The boolean plugin canonicalizes boolean values.

Example

1 # Mount plugin
2 sudo kdb mount config.ecf user/tests/boolean dump boolean
3 
4 # By default the plugin uses `1` (true) and `0` (false) to represent boolean values
5 kdb set user/tests/boolean/truthiness false
6 kdb setmeta user/tests/boolean/truthiness type boolean
7 kdb get user/tests/boolean/truthiness
8 #> 0
9 
10 # The plugin does not change ordinary values
11 kdb set user/tests/boolean/key value
12 kdb get user/tests/boolean/key
13 #> value
14 
15 # Undo changes
16 kdb rm -r user/tests/boolean
17 sudo kdb umount user/tests/boolean

Configuration