cdgitpath remote.$remote.url
else
+ if [ -n "$1" ]; then
+ echo "Cannot find directory for remote $1" >&2
+ echo "Usage: cdremote [remote_name]" >&2
+ return 1
+ fi
+
_list_remotes '^\(/\|\.\./\)' # (/ or ../ at the beginning)
if [ ${#GIT_REMOTES[*]} -eq 1 ]; then
remote=${GIT_REMOTES[0]}
_list_remotes_completion() {
local cur="${COMP_WORDS[COMP_CWORD]}";
_list_remotes "$1"
- COMPREPLY=(`compgen -W "$GIT_REMOTES" -- "$cur"`)
+ COMPREPLY=(`compgen -W "${GIT_REMOTES[*]}" -- "$cur"`)
unset GIT_REMOTES
}