diff options
author | Clint Adams <clint@users.sourceforge.net> | 2008-09-01 18:49:32 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2008-09-01 18:49:32 +0000 |
commit | eeed2898142517029c318ed53ece27e0e16ad99f (patch) | |
tree | 28e6d4679047142eea5e227f6ff25286f07770f7 | |
parent | a19d9c7ab846ad396639dc6303f203d37372bf73 (diff) | |
download | zsh-eeed2898142517029c318ed53ece27e0e16ad99f.tar.gz zsh-eeed2898142517029c318ed53ece27e0e16ad99f.tar.xz zsh-eeed2898142517029c318ed53ece27e0e16ad99f.zip |
Frank Terbeck: 25583: more git alias fixes.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | 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 <clint@zsh.org> + + * Frank Terbeck: 25583: Completion/Unix/Command/_git: more git + alias fixes. + 2008-09-01 Peter Stephenson <pws@csr.com> * 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 |