[pve-devel] applied-series: [PATCH common 0/2] fix partial shell completion
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Aug 14 11:23:21 CEST 2019
Am 7/30/19 um 2:42 PM schrieb Stoiko Ivanov:
> Since a while partial command completion ('qm re<TAB><TAB>' yielding
> 'rescan reset resize resume' and completing to 'qm res')
> has not been working (broke with release of libpve-common-perl 5.0-33).
>
> The issue was introduced by setting the returned command-definition ($cmdref,
> $ref) to undef in cases there is no complete match - which is useful for usage
> messages (see 57c0d0c69c687f2dff876aa81369622d0ae0a841 for a good example).
>
> The proposed fix reintroduces the functionality by keeping the behavior before
> 57c0d0c69c687f2dff876aa81369622d0ae0a841 if the partial command is a prefix of
> a valid command, and returns undef otherwise.
>
> Roughly tested, but 'resolve_cmd' is used in quite a few contexts and its
> return values often serve more than one purpose - so I'd be grateful for
> a review!
>
> Stoiko Ivanov (2):
> CLIHandler: remove spurious abort()
> CLIHandler: consider valid prefixes for completion
>
> src/PVE/CLIHandler.pm | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
applied both patches, much thanks!
More information about the pve-devel
mailing list