mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue