8

Is there an easy way to do array manipulation in gsettings? I am comparing gsettings to OS X's defaults command that offers the defaults domain --array key overwrite-value and defaults domain --array-add key added-value interface for manipulating arrays.

As far as I can tell there is only gsettings set domain key "['overwrite-value']" available to gsettings. Not really pretty for when you want to add or remove one entry from an array.

I have seen a suggestion that allow me to add to an array, but I would rather use a interface if there is one.

Daniel
  • 1,228
  • 2
  • 16
  • 40

1 Answers1

4

No, gsettings doesn't support any array operations except getting and setting the whole array.

Florian Diesch
  • 86,013
  • 17
  • 224
  • 214
  • Would be great to append elements to array (like when [adding custom shorcuts](https://askubuntu.com/questions/597395/how-to-set-custom-keyboard-shortcuts-from-terminal/597414#comment1776277_826328). It's not clear for me where the feature request should be filed, [here](https://gitlab.gnome.org/GNOME/gtk/issues?label_name%5B%5D=GtkSettings)? – Pablo Bianchi Jan 04 '20 at 22:27