mirror of https://gitee.com/openkylin/libvirt.git
vsh: Move 'vshReadlineOptionsGenerator' out of '#if WITH_READLINE'
It's now also used in vshCompleteHelpCommand which is outside of the
conditionally compiled code.
Fixes: 80f70c74a7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
c580c8db70
commit
9d26af5e5b
18
tools/vsh.c
18
tools/vsh.c
|
@ -2543,17 +2543,12 @@ vshTreePrint(vshControl *ctl, vshTreeLookup lookup, void *opaque,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WITH_READLINE
|
|
||||||
|
|
||||||
/* -----------------
|
|
||||||
* Readline stuff
|
|
||||||
* -----------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vshReadlineCommandGenerator:
|
* vshReadlineCommandGenerator:
|
||||||
*
|
*
|
||||||
* Generator function for command completion.
|
* Generator function for command completion. Used also for completing the
|
||||||
|
* '--command' option of the 'help' command.
|
||||||
*
|
*
|
||||||
* Returns a string list of all commands, or NULL on failure.
|
* Returns a string list of all commands, or NULL on failure.
|
||||||
*/
|
*/
|
||||||
|
@ -2590,6 +2585,15 @@ vshReadlineCommandGenerator(void)
|
||||||
return g_steal_pointer(&ret);
|
return g_steal_pointer(&ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if WITH_READLINE
|
||||||
|
|
||||||
|
/* -----------------
|
||||||
|
* Readline stuff
|
||||||
|
* -----------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
static char **
|
static char **
|
||||||
vshReadlineOptionsGenerator(const vshCmdDef *cmd,
|
vshReadlineOptionsGenerator(const vshCmdDef *cmd,
|
||||||
vshCmd *last)
|
vshCmd *last)
|
||||||
|
|
Loading…
Reference in New Issue