From 298f43b62ec0e374b0173ea738e001a656a9cfba Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 25 Feb 2020 18:53:46 +0100 Subject: [PATCH] completions/git: Work around read trimming whitespace Since #6406, read will trim whitespace before the last variable. In this case there is only one variable, and the line looks like M CHANGELOG.md so it does indeed start with whitespace, and the whitespace is quite significant. Fixes #6650. [ci skip] --- share/completions/git.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index 5c340a421..9814d5ee2 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -339,7 +339,7 @@ function __fish_git_files # Note that we can't use space as a delimiter between status and filename, because # the status can contain spaces - " M" is different from "M ". __fish_git $git_opt status --porcelain -z $status_opt \ - | while read -lz line + | while read -lz -d' ' line set -l desc # The entire line is the "from" from a rename. if set -q use_next[1]