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
This commit is contained in:
Dmitry Gerasimov 2025-01-18 15:05:14 +01:00 committed by Johannes Altmanninger
parent 9752b83e65
commit dfa77e6c19

View File

@ -886,7 +886,12 @@ reference\t<abbrev-hash> (<title-line>, <short-author-date>)
email\t<sha1> <date> / <author> / <author date> / <title> / <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