git completion: More stringification

This commit is contained in:
Fabian Homborg 2016-05-11 14:54:17 +02:00
parent a38d5504ac
commit d2e79cf6f6

View file

@ -133,18 +133,13 @@ function __fish_git_stash_not_using_subcommand
end end
function __fish_git_complete_stashes function __fish_git_complete_stashes
set -l IFS ':' command git stash list --format=%gd:%gs ^/dev/null | string replace ":" \t
command git stash list --format=%gd:%gs ^/dev/null | while read -l name desc
echo $name\t$desc
end
end end
function __fish_git_aliases function __fish_git_aliases
set -l IFS \n
command git config -z --get-regexp '^alias\.' ^/dev/null | while read -lz key value command git config -z --get-regexp '^alias\.' ^/dev/null | while read -lz key value
begin begin
set -l IFS "." set -l name (string replace -r '^.*\.' '' -- $key)
echo -n $key | read -l _ name
printf "%s\t%s\n" $name "Alias for $value" printf "%s\t%s\n" $name "Alias for $value"
end end
end end