From c97a922d35082052bee81fc894cc50ea9c8bea80 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 24 Jan 2023 19:03:36 +0100 Subject: [PATCH] completions/git: do not use user input as format string Suggested by f5711ad5e (git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs, 2022-10-27). (cherry picked from commit 7c1c3f9f77831aaad2dfe5eb5bce24351f78721c) --- 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 fb6733ce5..de2324fbd 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -509,7 +509,7 @@ function __fish_git_rev_files # List files in $rev's index, skipping the "tree ..." header, but appending # the parent path, which git does not include in the output (and fish requires) - printf "$path%s\n" (__fish_git show $rev:$path | sed '1,2d') + string join \n -- $path(__fish_git show $rev:$path | sed '1,2d') end # Provides __fish_git_rev_files completions for the current token