GNOME Bugzilla – Bug 612586
zenity can't have list values starting with a dash (-)
Last modified: 2021-05-25 17:45:38 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)
Created attachment 171592 [details] [review] Patch for hackfix of bug
The bug is present in GOption. I've made a patch that filters "--" from the command line args.
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.