[pve-devel] applied: [PATCH common] zsh-completion: Add missing flag to compadd

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Feb 21 09:45:47 CET 2020


Am 2/20/20 um 4:33 PM schrieb Christian Ebner:
> This fixes an issue with zsh completion where certain words were not added to the
> list of matches, but incorrectly interpreted as flags or options.
> 
> By passing the "--" flag, compadd is notified that all following arguments should
> be considered for completion and not interpreted as flags or options for compadd.
> 
> Details can be found in the compadd documentation:
> http://zsh.sourceforge.net/Doc/Release/Completion-Widgets.html#Completion-Builtin-Commands
> 
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
>  src/PVE/CLIHandler.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
> index 249c7cc..763cd60 100644
> --- a/src/PVE/CLIHandler.pm
> +++ b/src/PVE/CLIHandler.pm
> @@ -519,7 +519,7 @@ function _$exename() {
>      cmd=\${words[1]}
>      curr=\${words[cwords]}
>      prev=\${words[cwords-1]}
> -    compadd \$(COMP_CWORD="\$cwords" COMP_LINE="\$line" COMP_POINT="\$point" \\
> +    compadd -- \$(COMP_CWORD="\$cwords" COMP_LINE="\$line" COMP_POINT="\$point" \\
>  	$exename bashcomplete "\$cmd" "\$curr" "\$prev")
>  }
>  __EOD__
> 

applied, thanks!




More information about the pve-devel mailing list