From b31b77cf835c55e4fefc0aae01ccf2551b8c472a Mon Sep 17 00:00:00 2001 From: Shaik Azhar Madar <48410397+azarmadr@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:53:24 +0530 Subject: [PATCH] Update p4.fish add `--` for the string match command, so that if the `$line` has any `-`'s in it will be ignored --- share/completions/p4.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/completions/p4.fish b/share/completions/p4.fish index b1ca16d1a..afa72b7d0 100644 --- a/share/completions/p4.fish +++ b/share/completions/p4.fish @@ -45,7 +45,7 @@ function __fish_print_p4_changelists -d "Reformat output from `p4 changes` to si continue end # see output format ^^^ - set -l change_match (string match -ar '^Change ([0-9]+) on [0-9/]+ by (\S+).*$' $line) + set -l change_match (string match -ar '^Change ([0-9]+) on [0-9/]+ by (\S+).*$' -- $line) if test -n "$change_match" if test -n "$result" echo $result @@ -56,7 +56,7 @@ function __fish_print_p4_changelists -d "Reformat output from `p4 changes` to si set result $result $change_match[3]: end else - set result $result $line + set -a result $line end end