mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Update p4.fish
add `--` for the string match command, so that if the `$line` has any `-`'s in it will be ignored
This commit is contained in:
parent
c3c8327610
commit
b31b77cf83
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue