Mercurial > hg-stable
changeset 20131:56df59cc4212
bash_completion: add _hg_branches for list of branches
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 25 Nov 2013 11:38:14 -0500 |
parents | 7c78c7eff119 |
children | d14f9c4a4398 |
files | contrib/bash_completion |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/bash_completion Tue Nov 26 14:38:14 2013 -0600 +++ b/contrib/bash_completion Mon Nov 25 11:38:14 2013 -0500 @@ -94,6 +94,13 @@ COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) } +_hg_branches() +{ + local branches="$(_hg_cmd branches -q)" + local IFS=$'\n' + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$branches' -- "$cur")) +} + _hg_bookmarks() { local bookmarks="$(_hg_cmd bookmarks -q)"