From: Oleg Broytman Date: Wed, 13 Jul 2016 04:56:39 +0000 (+0300) Subject: .shellrc: declare a variable local instead of unsetting it X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c31a33ecc17ef4720fded354f5adf520e43fc798;p=dotfiles.git .shellrc: declare a variable local instead of unsetting it --- diff --git a/.shellrc b/.shellrc index 1415c42..f027cc1 100644 --- a/.shellrc +++ b/.shellrc @@ -171,12 +171,12 @@ if test -n "$BASH_VERSION"; then # list remotes with URLs matching a regexp list_remotes() { GIT_REMOTES="" + local remote for remote in `git remote`; do if git config --get remote.$remote.url | grep -q "$1"; then GIT_REMOTES="$GIT_REMOTES $remote" fi done - unset remote } # completion for cdremote - list remotes with directories as URLs