If the example is not something you plan on putting in the man page,
then that's okay. I was just pointing out that anything mentioned in
the man page should also mention the need for proper shell quoting.
Got it, thank you. I'm unsure. No, I wasn't planning on adding an
example. Peter, you initially reviewed this patch, what do you think?
(I checked and I don't see many examples on the manpage in general.)
Personally, I like examples but am unsure about the scope, like how
many examples, which options should be exemplified, etc.
On Wed, Apr 29, 2020 at 4:16 PM Eric Blake <eblake(a)redhat.com> wrote:
>
> On 4/29/20 8:11 AM, Sebastian Mitterle wrote:
> >> We should really encourage users to properly quote their command line to
> > avoid unintentional globbing:
> >
> > Not sure I understand, is this a request to use '"name[i]"'
with
> > single and double quotes in the manpage?
>
> One or the other, but not both.
>
> Buggy:
> # virsh blockpull fedora vda vda[1]
>
> Ok:
> # virsh blockpull fedora vda 'vda[1]'
> # virsh blockpull fedora vda "vda[1]"
> # virsh blockpull fedora vda vda\[1]
>
> the point is that any shell example that can misbehave due to globbing
> if underquoted should instead be properly quoted.
> >
> > Please, note that the line you quote is not part of the patch but
> > sample invocations to demonstrate behavior of blockpull command
> > regarding mandatory positional arguments to justify v2 of this patch.
> >
>
If the example is not something you plan on putting in the man page,
then that's okay. I was just pointing out that anything mentioned in
the man page should also mention the need for proper shell quoting.
>
>
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3226
> Virtualization:
qemu.org |
libvirt.org
>
--
Best,
Sebastian