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 612586 - zenity can't have list values starting with a dash (-)
zenity can't have list values starting with a dash (-)
Status: RESOLVED OBSOLETE
Product: zenity
Classification: Core
Component: general
2.28.x
Other Linux
: Normal enhancement
: ---
Assigned To: Zenity Maintainers
Zenity Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-11 15:54 UTC by Karel Vervaeke
Modified: 2021-05-25 17:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for hackfix of bug (923 bytes, patch)
2010-10-02 22:55 UTC, Kishore kumar J
none Details | Review

Description Karel Vervaeke 2010-03-11 15:54:52 UTC
The following command does not work:
zenity --list --column flags "-foo" "-bar"
This option is not available. Please see --help for all possible usages.

Reason: zenity interprets -foo and -bar as options.  (The quotes are just there for decoration, they are eaten by bash & never seen by zenity).

Workaround:
You can work around it by adding a space in front (but then the space becomes part of the selected value, so you should remove the space later)
zenity --list --column flags " -foo" " -bar"

Suggested solution:
commands like 'cp', 'rm' and many more use the convention that everything after "--" is interpreted literally (no more flags).  If zenity also did this you could write:
zenity --list --column flags -- -foo -bar
(Other software requires you to write -- before every argument that needs escaping.  e.g. zenity --list --column flags -- -foo -- -bar)
Comment 1 Kishore kumar J 2010-10-02 22:55:58 UTC
Created attachment 171592 [details] [review]
Patch for hackfix of bug
Comment 2 Kishore kumar J 2010-10-02 22:57:17 UTC
The bug is present in GOption. I've made a patch that filters "--" from the command line args.
Comment 3 André Klapper 2021-05-25 17:45:38 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/zenity/-/issues/

Thank you for your understanding and your help.