mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
virsh: Don't skip the first entry when the typed command share same prefix
Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
parent
c9da6cbec9
commit
f33d02c11f
@ -3495,11 +3495,11 @@ cmdComplete(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (!(matches = vshReadlineCompletion(arg, 0, 0)))
|
if (!(matches = vshReadlineCompletion(arg, 0, 0)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* According to rl_completion_matches documentation, the
|
for (iter = matches; *iter; iter++) {
|
||||||
* first entry in @matches array is some dummy substitution
|
if (iter == matches && matches[1])
|
||||||
* string for @arg. Skip it. */
|
continue;
|
||||||
for (iter = &matches[1]; *iter; iter++)
|
|
||||||
printf("%s\n", *iter);
|
printf("%s\n", *iter);
|
||||||
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user