mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:59:27 +08: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
|
@ -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 New Issue
Block a user