On Tue, Jul 15, 2008 at 2:54 AM, David Powell <[EMAIL PROTECTED]> wrote: > Dennis Clarke wrote: >> >> The placement of the -v parameter to pkg should not be position >> depenedant. So long as it does not get inthe way of a parameter that >> requires some data/tag/token after it like -R thus : > >> -bash-3.2# pkg -R /mnt image-update -v >> >> this is seen as acceptable .. but "pkg -v -R /mnt image-update" is not. >> >> The -v option is valid for image-update and thus it is acceptable as >> an option. The order of placement on the command line should not >> matter. > > Correct, the order of options on the command line shouldn't matter. > pkg options can appear in any order. subcommand options can appear > in any order. They aren't the same thing, though, and can't be > mixed. I call attention to the usage message: > >> pkg: illegal global option -- v >> Usage: >> pkg [options] command [cmd_options] [operands] > > Note the distinction between "options" and "cmd_options". > > Given that -v is a subcommand-specific option, it doesn't make any > more sense to permit 'pkg -v image-update' than it would to permit > '-R /mnt pkg image-update'.
Well, if I may look at this from the average users perspective I would think that the *primary* objective of any given command line utility should be to perform a given function in a repaeatable and predictable fashion with stable output. The secondary objective should be ease of use for the average user. Let's look at this .. please bear with me here : re : http://www.blastwave.org/man/pkg_1.html image-update [-nvq] Update all installed packages in the current image to the latest available version. With the -n option, execute the requested operation but make no persistent changes to the image. With the -v option, issue verbose progress messages during the requested operation. With the -q option, be completely silent. OKay, so we know that if the user wants verbose output then they can append a "-v" on the command line *after* they specify the characters "image-update". I would thnk that the software should parse the entire command line first and then create a graph of valid commands discovered as well as valid options and order should not matter. That allows more flexibility and keeps users happy. also .. it works :-) DOWNLOAD PKGS FILES XFER (MB) Completed 555/555 15445/15445 839.58/839.58 PHASE ACTIONS Removal Phase 6137/6137 Update Phase 13765/13765 Install Phase 8372/8372 opensolaris-2 has been updated successfully -bash-3.2# Dennis _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
