On Fri, Jul 10, 2026 at 10:05:45 +0200, Peter Krempa via Devel wrote:
> On Thu, Jul 09, 2026 at 15:00:57 +0200, Radosław Śmigielski via Devel wrote:
> > From: Radoslaw Smigielski <[email protected]>
> > 
> > The '--file' option of 'dump' command specifies where to store the
> > core dump file.
> > 
> > Partially-fixes: https://gitlab.com/libvirt/libvirt/-/work_items/9
> > Signed-off-by: Radoslaw Smigielski <[email protected]>
> > ---
> >  tools/virsh-domain.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> > index aa4f2a7a481b..f466976931c6 100644
> > --- a/tools/virsh-domain.c
> > +++ b/tools/virsh-domain.c
> > @@ -5911,6 +5911,7 @@ static const vshCmdOptDef opts_dump[] = {
> >       .type = VSH_OT_STRING,
> >       .positional = true,
> >       .required = true,
> > +     .completer = vshCompletePathLocalExisting,
> 
> The dump target doesn't exist yet so this completer is not the correct
> one:
> 
> 
> /**
>  * vshCompletePathLocalExisting:
>  *
>  * Complete a path to a existing file used as input. The file is used as input
> 
>                         ^^^^^^^^
> 
>  * for virsh so only local files are considered.
>

To be clear: Any argument that is supposed to point to a file to be
created (doesn't exist) should be completed by a separate function
(which IIRC doesn't exist yet) even when it will do the exact same thing
as vshCompletePathLocalExisting. This is to prevent the need to go
trhough everything if we figure out that we want to do something else
than the readline default.

Reply via email to