Last active
August 29, 2015 14:03
-
-
Save Pyppe/87bc408c4659ea09135f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_to_path() { | |
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then | |
export PATH="$1:$PATH" | |
fi | |
} | |
add_to_path $HOME/apps/foobar | |
findFromHistory() { | |
history | cut -c 8-|awk '!x[$0]++'|grep $1 | |
} | |
alias find-from-history=findFromHistory | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment