[pve-devel] applied: [PATCH pve-common] fix regex quoting in $print_bash_completion

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jun 14 09:11:19 CEST 2018


On 6/14/18 9:04 AM, Dietmar Maurer wrote:
> Signed-off-by: Dietmar Maurer <dietmar 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 d871ba6..0d2604e 100644
> --- a/src/PVE/CLIHandler.pm
> +++ b/src/PVE/CLIHandler.pm
> @@ -313,7 +313,7 @@ my $print_bash_completion = sub {
>      shift @$args; # no need for program name
>      my $print_result = sub {
>  	foreach my $p (@_) {
> -	    print "$p\n" if $p =~ m/^$cur/;
> +	    print "$p\n" if $p =~ m/^\Q$cur\E/;
>  	}
>      };
>  
>

applied




More information about the pve-devel mailing list