public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* regtool  2.11.1 need a way to specify leading "-" in values
@ 2019-01-22 23:12 Gordon Grimes
  2019-01-22 23:21 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Gordon Grimes @ 2019-01-22 23:12 UTC (permalink / raw)
  To: cygwin

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.

Example:
% regtool -s set '\HKCU\Environment\MAVEN_OPTS' "-Xms512m -Xmx3072m  -Dcom.sun.management.jmxremote"
regtool: unknown option -- X
Try `regtool --help' for more information.


% regtool --version
regtool (cygwin) 2.11.1
Registry tool
Copyright (C) 2000 - 2018 Cygwin Authors


Thanks,
ggrimes

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: regtool 2.11.1 need a way to specify leading "-" in values
  2019-01-22 23:12 regtool 2.11.1 need a way to specify leading "-" in values Gordon Grimes
@ 2019-01-22 23:21 ` Eric Blake
  2019-01-23  0:05   ` Gordon Grimes
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2019-01-22 23:21 UTC (permalink / raw)
  To: cygwin, Gordon_Grimes


[-- Attachment #1.1: Type: text/plain, Size: 932 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: regtool 2.11.1 need a way to specify leading "-" in values
  2019-01-22 23:21 ` Eric Blake
@ 2019-01-23  0:05   ` Gordon Grimes
  0 siblings, 0 replies; 3+ messages in thread
From: Gordon Grimes @ 2019-01-23  0:05 UTC (permalink / raw)
  To: Eric Blake, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1438 bytes --]

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

\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-23  0:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 23:12 regtool 2.11.1 need a way to specify leading "-" in values Gordon Grimes
2019-01-22 23:21 ` Eric Blake
2019-01-23  0:05   ` Gordon Grimes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).