From dfa77e6c197bf7027b3baf408e64661e23da6ffa Mon Sep 17 00:00:00 2001 From: Dmitry Gerasimov Date: Sat, 18 Jan 2025 15:05:14 +0100 Subject: [PATCH] completions/git: show custom aliases for --pretty option Custom formats for --pretty/--format option can only be written in [pretty] section, thus only this section is searched. [ja: add ? to the regex] Closes #11065 --- share/completions/git.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index bbbb51d31..123e0bc30 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -886,7 +886,12 @@ reference\t (, ) email\t / / / / <commit msg> mboxrd\tLike email, but lines in the commit message starting with \"From \" are quoted with \">\" raw\tShow the entire commit exactly as stored in the commit object -format:\tSpecify which information to show" +format:\tSpecify which information to show +" + __fish_git config -z --get-regexp '^pretty\.' 2>/dev/null | while read -lz key value + set -l name (string replace -r '^.*?\.' '' -- $key) + printf "%s\t%s\n" $name $value + end end end