]> git.phdru.name Git - dotfiles.git/commitdiff
Refactor(.shellrc): Remove `_cdgitpath_completion_loader`
authorOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 19:11:59 +0000 (22:11 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 19:11:59 +0000 (22:11 +0300)
`_cdgitpath_complete` can be used directly.

.shellrc

index 0677d0e7f11407883a0552b386fb7dff5eeab0b8..d9c4badb1c93e3fbb7e58017b884b95feb7270c3 100644 (file)
--- 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() {