After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650361 - command-line gsettings tool can't easily set value to empty string
command-line gsettings tool can't easily set value to empty string
Status: RESOLVED DUPLICATE of bug 649915
Product: glib
Classification: Platform
Component: gsettings
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-05-16 23:06 UTC by Adam Dingle
Modified: 2011-05-16 23:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Dingle 2011-05-16 23:06:10 UTC
I'm using gsettings from glib 2.28.6 on Fedora 15.

If I try to use the gsettings command-line tool to set a value to the empty string in the obvious way, I get an error:

$ gsettings set org.gnome.Epiphany homepage-url ''
0:expected value
$

I found by trial and error that this works:

$ gsettings set org.gnome.Epiphany homepage-url '""'

That wasn't very obvious, however.  I think the first syntax should be supported.
Comment 1 Allison Karlitskaya (desrt) 2011-05-16 23:23:57 UTC
hi Adam

The problem (of course) is that the shell is eating the quotes in the first case.  The value gets parsed by GVariant which expects to see quotes in the case of a string.  If the quotes don't make it through then you're in trouble.

I'm thinking about what I should do to make this a bit nicer...

In any case, you're a dup of #649915

*** This bug has been marked as a duplicate of bug 649915 ***