]> git.phdru.name Git - dotfiles.git/blobdiff - .shellrc
.shellrc: declare a variable local instead of unsetting it
[dotfiles.git] / .shellrc
index 035f756e4c4ce6302c7f41a484e4136af50cefe6..f027cc123032170fbbf361827660a1c3eba6cb66 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -121,7 +121,7 @@ if test -n "$BASH_VERSION"; then
    fi
    complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser
 
-   if which pip >/dev/null 2>&1; then
+   if type -p pip >/dev/null 2>&1; then
       eval "`pip completion --bash`"
       rm -rf /tmp/pip_build_"$USER"
    fi
@@ -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
@@ -316,15 +316,15 @@ tmux() {
 }
 
 
-if [ -f /usr/local/bin/virtualenvwrapper_lazy.sh ]; then
-   source /usr/local/bin/virtualenvwrapper_lazy.sh
-fi
-
 #if which pyenv >/dev/null 2>&1; then
 #   eval "`pyenv init -`"
 #   eval "`pyenv virtualenv-init -`"
 #fi
 
+if [ -f /usr/local/bin/virtualenvwrapper_lazy.sh ]; then
+   source /usr/local/bin/virtualenvwrapper_lazy.sh
+fi
+
 
 X() { startx >> .Xserver.log 2>&1; cyr; }
 x() { exit; }