From ed7cdee7b186fee9d99410d77ef722add83e4a32 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 7 Jul 2016 18:30:10 +0300 Subject: [PATCH] .shellrc: define completion for git-open - list remotes with http(s) URLs --- .shellrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.shellrc b/.shellrc index d0c9c37..38f7381 100644 --- a/.shellrc +++ b/.shellrc @@ -195,6 +195,17 @@ case "$SHELL" in } complete -F _cdremote_complete cdremote + + # define completion for git-open - list remotes with http(s) URLs + _git_open() { + local cur="${COMP_WORDS[COMP_CWORD]}"; + list_remotes '^http\(s\)\?://' + COMPREPLY=(`compgen -W "$GIT_REMOTES" -- "$cur"`) + GIT_REMOTES="" + unset GIT_REMOTES + } + + complete -F _git_open git-open ;; esac -- 2.39.2