Elektra  0.9.3
Plugin: mozprefs

This plugin works on Mozilla preference files and is used in Elektra’s Firefox autoconfig script.

Only Keys below one of these points are valid, everything else will be dropped

In Mozilla preference files . is used to separate sections, while elektra uses /. For simplification, and because / isn't allowed in preference keys, the plugin treats . and / equally.

kdb set system/prefs/lock/a/lock/key lock
kdb set system/prefs/lock/a/lock.key lock
kdb set system/prefs/lock/a.lock.key lock

will all result in lockPref("a.lock.key", "lock");

```

Backup-and-Restore:user/tests/mozprefs

sudo kdb mount prefs.js user/tests/mozprefs mozprefs

kdb meta-set user/tests/mozprefs/lock/a/lock/key type boolean kdb set user/tests/mozprefs/lock/a/lock/key true kdb meta-set user/tests/mozprefs/pref/a/default/key type string kdb set user/tests/mozprefs/pref/a/default/key "i'm a default key" kdb meta-set user/tests/mozprefs/user/a/user/key type integer kdb set user/tests/mozprefs/user/a/user/key 123

kdb export user/tests/mozprefs ini #> [lock/a/lock] #> # type = boolean #> key=true #> [pref/a/default] #> # type = string #> key=i'm a default key #> [user/a/user] #> # type = integer #> key=123

cat kdb file user/tests/mozprefs #> lockPref("a.lock.key", true); #> pref("a.default.key", "i'm a default key"); #> user_pref("a.user.key", 123);

cleanup

kdb rm -r user/tests/mozprefs sudo kdb umount user/tests/mozprefs ```