pcp
[Top] [All Lists]

Re: [pcp] pmval -i vs pmstore -i

To: Marko Myllynen <myllynen@xxxxxxxxxx>
Subject: Re: [pcp] pmval -i vs pmstore -i
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon, 9 May 2016 19:12:35 -0400 (EDT)
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <573076AF.8000009@xxxxxxxxxx>
References: <573076AF.8000009@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: zpoelOlIfZOwapbeDK/r5qjPqytkIQ==
Thread-topic: pmval -i vs pmstore -i
Hi Marko,

----- Original Message -----
> Hi,
> 
> pmval and pmstore are the two clients which allow specifying the
> targeted instances with -i. pmval, like most other clients also accept
> arguments in this manner:
> 
> $ pmval kernel.all-load -i "'1 minute'"
> 
> So options can follow after non-option arguments. pmval also accepts
> multiple -i options.
> 
> pmstore, on the other does not allow either. Only one -i and options
> can't follow non-options.
> 
> I think it would be more consistent and also help with scripting in
> certain scenarios if pmstore would be like pmval in this regard.
> 
> Or is there are practical reason for this difference? If not I think
> I'll at least file an RFE.
> 

I have a vague memory of this being due to the need for pmstore to accept
negative values (like "-1") which get reordered by GNU getopts & presented
as an option ("1").

That was the original reason, I think, & if not for backward-compatibility
we'd probably have just documented "--" to end non-option arguments.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>