Mercurial > dotfiles
comparison .zfun/_hg @ 56:1c75cab141ae
Fix up the number of spaces required so really long branch names don't screw up the completion.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 20 Feb 2009 14:21:27 -0600 |
parents | 846d556d9619 |
children | 0ba810271408 |
comparison
equal
deleted
inserted
replaced
55:846d556d9619 | 56:1c75cab141ae |
---|---|
145 typeset -a tags | 145 typeset -a tags |
146 local tag rev | 146 local tag rev |
147 | 147 |
148 _hg_cmd tags 2> /dev/null | while read tag | 148 _hg_cmd tags 2> /dev/null | while read tag |
149 do | 149 do |
150 tags+=(${tag/ # [0-9]#:*}) | 150 tags+=(${tag/ # [0-9]#:*}) |
151 done | 151 done |
152 (( $#tags )) && _describe -t tags 'tags' tags | 152 (( $#tags )) && _describe -t tags 'tags' tags |
153 } | 153 } |
154 | 154 |
155 _hg_branches() { | 155 _hg_branches() { |
156 typeset -a branches | 156 typeset -a branches |
157 local branch | 157 local branch |
158 | 158 |
159 _hg_cmd branches -a 2> /dev/null | while read branch | 159 _hg_cmd branches -a 2> /dev/null | while read branch |
160 do | 160 do |
161 branches+=(${branch/ # [0-9]#:*}) | 161 branches+=(${branch/ # [0-9]#:*}) |
162 done | 162 done |
163 (( $#branches )) && _describe -t branches 'branches' branches | 163 (( $#branches )) && _describe -t branches 'branches' branches |
164 } | 164 } |
165 | 165 |
166 _hg_branchtags() { | 166 _hg_branchtags() { |
167 typeset -a branchtags | 167 typeset -a branchtags |
168 local branch tag | 168 local branch tag |
169 | 169 |
170 _hg_cmd tags 2> /dev/null | while read tag | 170 _hg_cmd tags 2> /dev/null | while read tag |
171 do | 171 do |
172 branchtags+=(${tag/ # [0-9]#:*}) | 172 branchtags+=(${tag/ # [0-9]#:*}) |
173 done | 173 done |
174 | 174 |
175 _hg_cmd branches -a 2> /dev/null | while read branch | 175 _hg_cmd branches -a 2> /dev/null | while read branch |
176 do | 176 do |
177 branchtags+=(${branch/ # [0-9]#:*}) | 177 branchtags+=(${branch/ # [0-9]#:*}) |
178 done | 178 done |
179 (( $#branchtags )) && _describe -t branchtags 'branchtags' branchtags | 179 (( $#branchtags )) && _describe -t branchtags 'branchtags' branchtags |
180 } | 180 } |
181 | 181 |
182 _hg_files() { | 182 _hg_files() { |