Mercurial > hg
comparison contrib/bash_completion @ 20135:e39bd4b7be78
bash_completion: add global support for -b|--branch
Previously, only -r|--rev was parsed globally which meant 'hg push -b <tab>'
would try to complete a path instead of a branch.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Tue, 26 Nov 2013 14:33:18 -0600 |
parents | bc9735855598 |
children | 28ecdf3fa1db |
comparison
equal
deleted
inserted
replaced
20134:bc9735855598 | 20135:e39bd4b7be78 |
---|---|
249 return 1 | 249 return 1 |
250 ;; | 250 ;; |
251 -B|--bookmark) | 251 -B|--bookmark) |
252 if [[ $canonical = 1 || status != "$cmd"* ]]; then | 252 if [[ $canonical = 1 || status != "$cmd"* ]]; then |
253 _hg_bookmarks | 253 _hg_bookmarks |
254 return 0 | |
255 fi | |
256 return 1 | |
257 ;; | |
258 -b|--branch) | |
259 if [[ $canonical = 1 || status != "$cmd"* ]]; then | |
260 _hg_branches | |
254 return 0 | 261 return 0 |
255 fi | 262 fi |
256 return 1 | 263 return 1 |
257 ;; | 264 ;; |
258 esac | 265 esac |