On Tue, Aug 15, 2006 at 08:56:00PM +0930, Darren J Moffat wrote:
> Eric Schrock wrote:
> 
> >This case adds a new option, 'zfs create -o', which allows for any ZFS
> >property to be set at creation time.  Multiple '-o' options can appear
> >in the same subcommand.  Specifying the same property multiple times in
> >the same command results in an error.  For example:
> >
> >     # zfs create -o compression=on -o mountpoint=/export pool/fs
> 
> Looks fine to me.
> 
> The one minor nit I have is that this even more shows up the positional 
> parameters problem that zfs create and other zfs(1) commands have.  Some 
> people don't mind it and I've created interfaces like it for years; 
> recently however I've been trying to avoid doing so, or at least giving 
> an alternative.
> 
> For this case would it be possible to have this:
> 
> # zfs create -o compression=on -o mountpoint=/export -o name=pool/fs

I for one don't have an issue with fixed positional parameters, they are
fine by me.  This is a good case of where they become an issue; however.

Could you "mix and match" by keeping the current style assuming there
are no -o options present?

# zfs create pool/fs

If you need to specify options, then they should all be options:

# zfs create -o name=pool/fs -o mountpoint=/bar -o etc

just a thought.  I certainly like not having to run zfs twice in order
to be able to set options, especially mountpoint.

-brian
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to