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

Gordon Grimes Gordon_Grimes@symantec.com
Wed Jan 23 00:05:00 GMT 2019


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

 ТÒÐÐ¥&ö&ÆVÒ&W÷'G3¢‡GG¢òö7–wv–âæ6öÒ÷&ö&ÆV×2æ‡FÖÀФd¢‡GG¢òö7–wv–âæ6öÒöfðФFö7VÖVçFF–ö㢇GG¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R–æfó¢‡GG¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×ÆPРÐ


More information about the Cygwin mailing list