Re: [PATCH] vsh: print help more often

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/21/2015 02:48 AM, Michal Privoznik wrote:
> So, consider following scenario:
> 
>   virsh # migrate --help
> 
> In this case migrate help is printed out. So far so good.
> However, you start writing this long migrate command (I bet you
> know the arguments  there can get quite long), but then, at some
> point you need to print out the help. Something like this:
> 
>   virsh # migrate --copy-storage-all --migrate-disks --help
> 
> In this specific case you just want to see the format that
> --migrate-disks accepts. So you append --help and expect help to
> be printed out. Well, it will not, because "--help" is taken as
> data to --migrate-disks.

But this is the behavior of ALL applications that use getopt_long():

$ ls --block-size --help
ls: invalid --block-size argument '--help'

NACK; if you use --help in the position where it will be eaten as the
argument to an incomplete long option, that's too bad for you, but we
shouldn't special case it differently than getopt_long().

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]