[PATCH 00/12] vsh: Improve completer code

Michal Privoznik posted 12 patches 3 years, 1 month ago
Test syntax-check failed
Failed in applying to current master (apply log)
src/libxl/xen_xl.c     |   2 +-
src/util/vircgroupv2.c |  10 +--
tools/vsh.c            | 152 ++++++++++++++++-------------------------
3 files changed, 63 insertions(+), 101 deletions(-)
[PATCH 00/12] vsh: Improve completer code
Posted by Michal Privoznik 3 years, 1 month ago
There is no functional change to completion. No user visible change, nor
to a developer who writes a completer callback. Some code deduplication
and code cleanup and adapting code to 2021.

Michal Prívozník (12):
  lib: Substitute some STREQLEN with STRPREFIX
  vsh: Don't put VSH_OT_ALIAS onto list of completions
  vsh: Use g_auto(GStrv) to free string list returned by completer
    callback
  vsh: Accept NULL @list in vshCompleterFilter()
  vsh: Prefer g_strdup_printf() over g_snprintf() in
    vshReadlineOptionsGenerator()
  vsh: Use g_auto() for string lists returned in readline
    command/options generators
  vsh: Rewrite opt->type check in vshReadlineParse()
  vsh: Deduplicate filtering in vshReadlineOptionsGenerator()
  vsh: Deduplicate filtering in vshReadlineCommandGenerator()
  vsh: Simplify condition for calling completer callback
  vsh: Rework vshReadlineCommandGenerator()
  vsh: Drop unused @text arg from readline generators

 src/libxl/xen_xl.c     |   2 +-
 src/util/vircgroupv2.c |  10 +--
 tools/vsh.c            | 152 ++++++++++++++++-------------------------
 3 files changed, 63 insertions(+), 101 deletions(-)

-- 
2.26.2

Re: [PATCH 00/12] vsh: Improve completer code
Posted by Jonathon Jongsma 3 years, 1 month ago
On Thu,  4 Feb 2021 15:13:25 +0100
Michal Privoznik <mprivozn@redhat.com> wrote:

> There is no functional change to completion. No user visible change,
> nor to a developer who writes a completer callback. Some code
> deduplication and code cleanup and adapting code to 2021.
> 
> Michal Prívozník (12):
>   lib: Substitute some STREQLEN with STRPREFIX
>   vsh: Don't put VSH_OT_ALIAS onto list of completions
>   vsh: Use g_auto(GStrv) to free string list returned by completer
>     callback
>   vsh: Accept NULL @list in vshCompleterFilter()
>   vsh: Prefer g_strdup_printf() over g_snprintf() in
>     vshReadlineOptionsGenerator()
>   vsh: Use g_auto() for string lists returned in readline
>     command/options generators
>   vsh: Rewrite opt->type check in vshReadlineParse()
>   vsh: Deduplicate filtering in vshReadlineOptionsGenerator()
>   vsh: Deduplicate filtering in vshReadlineCommandGenerator()
>   vsh: Simplify condition for calling completer callback
>   vsh: Rework vshReadlineCommandGenerator()
>   vsh: Drop unused @text arg from readline generators
> 
>  src/libxl/xen_xl.c     |   2 +-
>  src/util/vircgroupv2.c |  10 +--
>  tools/vsh.c            | 152
> ++++++++++++++++------------------------- 3 files changed, 63
> insertions(+), 101 deletions(-)
> 

Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>

Re: [PATCH 00/12] vsh: Improve completer code
Posted by Michal Privoznik 3 years, 1 month ago
On 2/9/21 5:42 PM, Jonathon Jongsma wrote:
> On Thu,  4 Feb 2021 15:13:25 +0100
> Michal Privoznik <mprivozn@redhat.com> wrote:
> 
>> There is no functional change to completion. No user visible change,
>> nor to a developer who writes a completer callback. Some code
>> deduplication and code cleanup and adapting code to 2021.
>>
>> Michal Prívozník (12):
>>    lib: Substitute some STREQLEN with STRPREFIX
>>    vsh: Don't put VSH_OT_ALIAS onto list of completions
>>    vsh: Use g_auto(GStrv) to free string list returned by completer
>>      callback
>>    vsh: Accept NULL @list in vshCompleterFilter()
>>    vsh: Prefer g_strdup_printf() over g_snprintf() in
>>      vshReadlineOptionsGenerator()
>>    vsh: Use g_auto() for string lists returned in readline
>>      command/options generators
>>    vsh: Rewrite opt->type check in vshReadlineParse()
>>    vsh: Deduplicate filtering in vshReadlineOptionsGenerator()
>>    vsh: Deduplicate filtering in vshReadlineCommandGenerator()
>>    vsh: Simplify condition for calling completer callback
>>    vsh: Rework vshReadlineCommandGenerator()
>>    vsh: Drop unused @text arg from readline generators
>>
>>   src/libxl/xen_xl.c     |   2 +-
>>   src/util/vircgroupv2.c |  10 +--
>>   tools/vsh.c            | 152
>> ++++++++++++++++------------------------- 3 files changed, 63
>> insertions(+), 101 deletions(-)
>>
> 
> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
> 

Thanks, fixed those two commit messages and pushed.

Michal