On 08/20/2012 10:28 PM, Yunkai Zhang wrote:
> Now, all collie's command share the same global collie_options, it will
> lead to option's name conflict among commands if they use the same options
> but with different description.
> 
> By introducing self options to each command (if necessary) and make
> collie_options only contain the common part of all options, we can solve this
> issue.

I like this improvement, but 'self options' doesn't explain the idea better. 
This is
kind of namespace for each sub command, so simply name it as:

+       struct sd_option *options;

in a structure is enough.

And rework the comment and commit log to replace 'self option' with more 
meaningful
phrase such as, for e.g, "By moving the global options into individual 
structure as a
private member, we can solve this problem"

Also, with this patch, we can then change all those upper cased options into 
lower cases,
such as vdi create -P -> vdi create -p for easier typing.

-- 
thanks,
Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to