# pip should only run if there is a virtualenv currently activated export PIP_REQUIRE_VIRTUALENV=true # global pip gpip gpip(){ PIP_REQUIRE_VIRTUALENV="" pip "$@" } # mkdir, cd into it mkcd () { mkdir -p "$*" cd "$*" } # Open New Tab in Google at google.com # Usage example in terminal: google “search words” google() { open /Applications/Google\ Chrome.app/ "http://www.google.com/search?q=$1"; } # For file extension renaming from http://ss64.com/bash/basename.html # Usage example: change_all_extensions txt qfilter BatchRenameExt() { for file in *.$1; do mv "$file" "`basename "$file" .$1`.$2" done }