Peter Memishian wrote:

> > >Consider the output for show-linkprop -c.  There are quotes around all 
> > >values.  While this provides consistency among the format of all possible 
> > >values of all possible properties (as some values may contain spaces), 
> > >it's not obvious to parse.  At least not for me.  How do I easily strip 
> > >the " characters from around a value in a shell script?
> > >
> > >The context is that I use the same syntax for "show-iptun -p", and I have 
> > >a need to get access to all of the IP tunnel names.  The output of dladm 
> > >show-iptun -p, for example, is
> > 
> > Given that -p is being used for parseable output here, I'd like to
> > suggest that ipmpstat be changed and the roles of -p/-P reversed
> > so that -p has the same behaviour for both.
>
>Sorry, I'm afraid of you've lost me.  However:
>
>       1. ipmpstat -p outputs probe information.  We could change that
>          to -P, but that would create greater usability issues because
>          the other four output modes are -a -i -g and -t (address
>          interface, group, and target), all use lowercase.  We could
>          change them all to be uppercase, but that would mean every
>          use of ipmpstat would need an extra keypress (the shift key)
>          which seems obnoxious.
>

If ZFS and SMF can integrate and introduce new commands that
have "long option names" (disable/enable/sharenfs/etc) then
I'd be tempted to think that the extra keypress argument holds
very little water when designing the CLI today.

A well thought out design for new layer 2 tools would ensure
that -p for both dladm and ipmpstat meant the same thing.
You might want to take another look at the way you've designed
the CLI for ipmpstat and think about a couple of things:

- does it need to have long option names like dladm, etc?
  or conversely, why doesn't it need to?

- if there are mutually exclusive options (such as -a/-i/-g/-t/-p),
  should they be individual options or sub-options? (e.g -x probe)

- how the behaviour of various command line options for ipmpstat
  can be made to have similar behaviour to the same letters
  elsewhere (less confusion.)

btw, the presentation of -a/-i/-g/-t/-p in the document does not
suggest the design you're alluding to here and I'm somewhat
surprised that -t and -p are seperate - they appear to be different
sides of the same coin (which might suggest -t/-T.)

Darren


Reply via email to