Moore, Joe wrote:
> Carson Gaspar wrote:
>> Darren J Moffat wrote:
>>> $ pwd
>>> /cube/builds/darrenm/bugs
>>> $ zfs create -c 6724478
>>>
>>> Why "-c" ?  -c for "current directory"  "-p" partial is 
>> already taken to 
>>> mean "create all non existing parents" and "-r" relative is 
>> already used 
>>> consistently as "recurse" in other zfs(1) commands (as well 
>> as lots of 
>>> other places).
>> Why not "zfs create $PWD/6724478". Works today, traditional UNIX 
>> behaviour, no coding required. Unles you're in some bizarroland shell 
>> (like csh?)...
> 
> Because the zfs dataset mountpoint may not be the same as the zfs pool
> name.  This makes things a bit complicated for the initial request.

The leading slash will be a problem with the current code. I forgot 
about that... make that ${PWD#/} (or change the code to ignore the 
leading slash...). That is, admittedly, more typing than a single 
character option, but not much.

And yes, if your mount name and pool names don't match, extra code would 
be required to determine the parent pool/fs of the path passed. But no 
more code than magic CWD goo... I really don't like special case options 
whose sole purpose is to shorten command line length.

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

Reply via email to