mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
completions/git: use our __fish_git wrapper for listing config values
Git completions use wrapper function __fish_git instead of directly running git. This allows them to be aware of Git's global options, like --git-dir. Let's use __fish_git also for listing config keys & values, so it can more accurately list local (= per repo) git configuration.
This commit is contained in:
parent
ee3a26d849
commit
ac428b23e5
1 changed files with 1 additions and 1 deletions
|
@ -576,7 +576,7 @@ function __fish_git_config_keys
|
|||
# Print already defined config values first
|
||||
# Config keys may span multiple lines, so parse using null char
|
||||
# With -z, key and value are separated by space, not "="
|
||||
git config -lz | while read -lz key value
|
||||
__fish_git config -lz | while read -lz key value
|
||||
# Print only first line of value(with an ellipsis) if multiline
|
||||
printf '%s\t%s\n' $key (string replace \n …\n -- $value)[1]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue