mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:47:04 +08:00
completions/git: Trim with the regex
This gives us another few percent. It's not *technically* the same because `trim` would remove a run of quotes, but that would be wrong anyway.
This commit is contained in:
parent
dd26611c0f
commit
493cbeb84c
|
@ -196,7 +196,7 @@ function __fish_git_files
|
|||
if set -ql untracked
|
||||
# Fast path for untracked files - it is extremely easy to get a lot of these,
|
||||
# so we handle them first
|
||||
set -l files (string match -rg '^\? (.*)' -- $stats | string trim -c \")
|
||||
set -l files (string match -rg '^\? "?(.*)"?' -- $stats)
|
||||
set stats (string match -rv '^\? ' -- $stats)
|
||||
printf "$rel%s\n" $files\t$untracked_desc
|
||||
if set -ql colon[1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user