regtool 2.11.1 need a way to specify leading "-" in values

Eric Blake eblake@redhat.com
Tue Jan 22 23:21:00 GMT 2019


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190122/acc82c25/attachment.sig>


More information about the Cygwin mailing list