This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: regtool 2.11.1 need a way to specify leading "-" in values
Perfect! Thanks much, Eric.
-----Original Message-----
From: Eric Blake <eblake@redhat.com>
Sent: Tuesday, January 22, 2019 6:21 PM
To: cygwin@cygwin.com; Gordon Grimes <Gordon_Grimes@symantec.com>
Subject: Re: regtool 2.11.1 need a way to specify leading "-" in values
On 1/22/19 5:12 PM, Gordon Grimes wrote:
> I believe there is no way to specify values with leading "-" in regtool. I expect the same applies to keys. An "end of switch processing" switch would be useful, forcing 'regtool' to interpret all remaining arguments literally.
Fortunately, you are mistaken. regtool uses getopt_long(), and therefore, like all other programs that use this, automatically inherits the POSIX rule that '--' is the marker for "end of switch processing".
>
> Example:
> % regtool -s set '\HKCU\Environment\MAVEN_OPTS' "-Xms512m -Xmx3072m -Dcom.sun.management.jmxremote"
> regtool: unknown option -- X
> Try `regtool --help' for more information.
Try:
regtool -s set '\HKCU\Environment\MAVEN_OPS' -- "-Xms512m -Xmx3072m -Dcom.sun.management.jmxremote"
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org