From 1decc13ba58c32545eef28b695083f4c697ba87d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 15 Aug 2019 22:11:59 +0300 Subject: [PATCH] Refactor(.shellrc): Remove `_cdgitpath_completion_loader` `_cdgitpath_complete` can be used directly. --- .shellrc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.shellrc b/.shellrc index 0677d0e..d9c4bad 100644 --- a/.shellrc +++ b/.shellrc @@ -259,13 +259,6 @@ if test -x /usr/bin/git >/dev/null 2>&1; then # push-to-all-remotes - do branch name completion _git_push_to_all_remotes() { __gitcomp_nl "$(__git_heads)" ; } - _cdgitpath_completion_loader() { - _completion_loader git - complete -F _cdgitpath_complete cdgitpath git-open - unset _cdgitpath_completion_loader - return 124 - } - _cdgitpath_complete() { local cword="${COMP_CWORD}" cur="${COMP_WORDS[COMP_CWORD]}"; COMPREPLY=(`compgen -W "$(__git_config_get_set_variables)" -- "$cur"`) @@ -275,7 +268,7 @@ if test -x /usr/bin/git >/dev/null 2>&1; then _cdgitpath_complete } - complete -F _cdgitpath_completion_loader cdgitpath git-open + complete -F _cdgitpath_complete cdgitpath git-open # list remotes with URLs matching a regexp _list_remotes() { -- 2.39.5