Joerg Barfurth wrote: > I was away a couple of days, but still wanted to comment. > > Darren Reed schrieb: > >> Something that really annoys me with zoneadm is that the syntax >> for its command line is different to the other new commands, ie >> the subommand comes after the zone name and the zone name >> needs to have a -z before it. >> >> ugh. >> >> So I went and looked at zoneadm.c - it seems well enough >> structured to make hacking easy.. >> >> The attached diffs modify zoneadm to work like this: >> >> zoneadm boot fred >> > > But your change becomes counterintuitive (IMHO), when subcommand > options are used. The result certainly doesn't fit any commandline > standard (CLIP, etc) I know.
Compare the usage of zoneadm with svcadm, dladm, zfs or any of the other newer *adm commands that have a subcommand directly after the command name. Furthermore, I'm not concerned with any _official_ standard, we seem to be making up our own "standards" as we go. I think having all of our commands that have subcommands be consistent in use within the same operating system is of value, don't you? > The distinction between operands and arguments get blurred when they > are positioned in arbitrary places. Typical syntax for command with > subcommands and arguments, would be > > zoneadm detach -n fred > > rather than > > zoneadm detach fred -n This wasn't a focus of what I was doing... But in all seriousness, if the subcommand is going to follow the command name then the other important change is to have the key be at the end. > OTOH a change that puts the zonename at the end is less obvious to do > in the code and results in less obvious syntax for subcommands that > have argument lists of their own, for example reboot: > > zoneadm reboot fred [ boot-args ] > or > zoneadm reboot -- fred [ boot-args ] > or > zoneadm reboot fred [-- boot-args ] > > Whichof those is best/acceptable/misleading? Considering that I do: reboot -- net - install it would seem that the best is the last. > > And the interaction with global options also is non-obvious. Why do > you support > > zoneadm mark fred incomplete > > (N.B: not 'zoneadm mark incomplete fred') > but not > > zoneadm -R /someroot mark fred incomplete Because doing that was going to take longer than the short period of time I set aside to experiment with this - in this case, parsing the -R needs to be moved to be after the subcommand. Darren _______________________________________________ zones-discuss mailing list zones-discuss@opensolaris.org