X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glaze.c;h=02a39275d0b3ba50101988e2386b7e499ecf8c88;hb=34d258542013821639bf8c4f60b0ae2c47e17091;hp=9a3e0553474783e2f95b63dded7ff3d4726354a6;hpb=85faa290c2777d8e89af05648c229b0da395d4f7;p=glaze diff --git a/glaze.c b/glaze.c index 9a3e055..02a3927 100644 --- a/glaze.c +++ b/glaze.c @@ -44,7 +44,17 @@ main (int argc, char *argv[]) const char *wrapper = NULL; int opt; - const char *short_options="h"; + /* The initial '+' means that getopt will stop looking for + * options after the first non-option argument. This means + * that a command such as: + * + * glaze glenv --renderer=Foo glxgears + * + * Will do what is intended, (namely, have glaze invoke "glenv + * --renderer=Foo glxgears" rather than trying to interpret + * --renderer=Foo as an option to glaze itself. + */ + const char *short_options="+h"; const struct option long_options[] = { {"help", no_argument, 0, 'h'}, {"wrapper", required_argument, 0, WRAPPER_OPT},