# HG changeset patch # User Sean Farley # Date 1385397494 18000 # Node ID 56df59cc4212853fdbeebe3e6475e924a3e6c70a # Parent 7c78c7eff119d377cfebab82a4eadffa37504acc bash_completion: add _hg_branches for list of branches diff -r 7c78c7eff119 -r 56df59cc4212 contrib/bash_completion --- 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)"