From eeed2898142517029c318ed53ece27e0e16ad99f Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 1 Sep 2008 18:49:32 +0000 Subject: Frank Terbeck: 25583: more git alias fixes. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6988addaf..6dc5d8150 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-01 Clint Adams + + * Frank Terbeck: 25583: Completion/Unix/Command/_git: more git + alias fixes. + 2008-09-01 Peter Stephenson * 25582: Completion/Unix/Type/_path_files: use suggestion diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index ae33de0fd..05f5c3692 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -4285,16 +4285,16 @@ git_aliases=(${=${(0)${(@)${${${(f)"$(git config --get-regexp alias.\*)"}/(#s)al IFS=$oifs ; unset oifs if (( CURRENT >= 3 )) && [[ -n ${git_aliases[$words[2]]} ]] ; then - local -a tmpwords - tmpwords=(${words[1]} ${(z)git_aliases[$words[2]]}) - if [[ -z "${words[3,-1]}" ]] ; then - tmpwords[$(( ${#tmpwords} + 1 ))]="" - else + local -a tmpwords expalias + expalias=(${(z)git_aliases[$words[2]]}) + tmpwords=(${words[1]} ${expalias}) + if [[ -n "${words[3,-1]}" ]] ; then tmpwords+=(${words[3,-1]}) fi + tmpwords+=('') + (( CURRENT += ${#expalias} - 1 )) words=("${tmpwords[@]}") - (( CURRENT += ${#${(z)git_aliases[$words[2]]}} - 1 )) - unset tmpwords + unset tmpwords expalias fi if [[ $service == git ]]; then -- cgit 1.4.1