aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/git.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-12-14 17:48:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-12-14 17:48:52 +1300
commit06f5ca98018fd4ba357b0e70b1e710b682b6cdb5 (patch)
tree76bc12131c82c87852e4183969d6969d9eeabf7f /bash/bashrc.d/git.bash
parentFix some English (diff)
downloaddotfiles-06f5ca98018fd4ba357b0e70b1e710b682b6cdb5.tar.gz
dotfiles-06f5ca98018fd4ba357b0e70b1e710b682b6cdb5.zip
Switch to a faster method of array appending
Does away with the nasty hack around man page discovery, and still compatible with Bash 2.05a
Diffstat (limited to 'bash/bashrc.d/git.bash')
-rw-r--r--bash/bashrc.d/git.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/git.bash b/bash/bashrc.d/git.bash
index 8c6fa466..7ac0524d 100644
--- a/bash/bashrc.d/git.bash
+++ b/bash/bashrc.d/git.bash
@@ -13,7 +13,7 @@ _git() {
while read -r _ _ branch ; do
branch=${branch##*/}
[[ $branch == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue
- COMPREPLY=("${COMPREPLY[@]}" "$branch")
+ COMPREPLY[${#COMPREPLY[@]}]=$branch
done < <(git for-each-ref refs/heads refs/tags 2>/dev/null)
return
;;