From: Oleg Broytman Date: Thu, 15 Aug 2019 19:11:59 +0000 (+0300) Subject: Refactor(.shellrc): Remove `_cdgitpath_completion_loader` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1decc13ba58c32545eef28b695083f4c697ba87d;p=dotfiles.git Refactor(.shellrc): Remove `_cdgitpath_completion_loader` `_cdgitpath_complete` can be used directly. --- 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() {