From a87861a250838b12add13990f8bb5ed4236d6320 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 14 Aug 2016 23:18:25 +0300 Subject: [PATCH] .shellrc: change bash completion for aliases --- .shellrc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.shellrc b/.shellrc index 9cee283..b776b4b 100644 --- a/.shellrc +++ b/.shellrc @@ -204,13 +204,16 @@ if test -x /usr/bin/git >/dev/null 2>&1; then if test -n "$BASH_VERSION"; then # completion for global aliases in .gitconfig - # fixup rbi rbia rbiap rbip - delegate to git-rebase completion - _git_fixup() { _git_rebase ; } - _git_rbi() { _git_rebase ; } - _git_rbia() { _git_rebase ; } - _git_rbiap() { _git_rebase ; } - _git_rbip() { _git_rebase ; } + # fixup rbi rbia rbiap rbip - do refs name completion + _git_fixup() { __gitcomp_nl "$(__git_refs)" ; } + _git_rbi() { __gitcomp_nl "$(__git_refs)" ; } + _git_rbia() { __gitcomp_nl "$(__git_refs)" ; } + _git_rbiap() { __gitcomp_nl "$(__git_refs)" ; } + _git_rbip() { __gitcomp_nl "$(__git_refs)" ; } + # + # push-to-all-remotes - do branch name completion + _git_push_to_all_remotes() { __gitcomp_nl "$(__git_heads)" ; } # list remotes with URLs matching a regexp _list_remotes() { -- 2.39.2