# HG changeset patch # User Sean Farley # Date 2013-11-25 16:38:14 # Node ID 56df59cc4212853fdbeebe3e6475e924a3e6c70a # Parent 7c78c7eff119d377cfebab82a4eadffa37504acc bash_completion: add _hg_branches for list of branches diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -94,6 +94,13 @@ shopt -s extglob 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)"