From 071ecabdef5b9d60c75fe0d6ecabda769acf9c9f Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sun, 2 Aug 2015 15:23:00 +0200 Subject: Added pip upgrade --- bash/.bashrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bash/.bashrc') diff --git a/bash/.bashrc b/bash/.bashrc index 389ebb4..90af7a1 100755 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -23,6 +23,8 @@ case "$(uname)" in usr="/usr/local" ;; *) + alias ls="ls --color=auto" + usr="/usr" ;; esac @@ -106,6 +108,19 @@ if exists less; then export PAGER="less" fi +if exists pip; then + pip() { + if [[ "$1" == "upgrade" ]]; then + outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }') + for pkg in $outdated; do + $usr/bin/pip install $pkg --upgrade + done + else + $usr/bin/pip $@ + fi + } +fi + if exists liquidprompt; then source liquidprompt fi -- cgit v1.2.3