Last active
August 29, 2015 14:15
-
-
Save wh13371/861e0de7dc9b56a6bacf to your computer and use it in GitHub Desktop.
.bash_profile - mac
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
# myMAC .bash_profile | |
# a decent bash prompt | |
# \d = date - \t = time - \u = user - \h = host - \w = cwd | |
#PS1='\[\e[1;33m\]\d \[\e[1;34m\]\t \[\e[1;36m\]\u\[\e[1;35m\]@\[\e[1;31m\]\h \[\e[1;33m\](\[\e[1;36m\]\w\[\e[1;33m\]) \[\e[1;37m\]% \e[m' | |
PS1='\[\e[1;35m\][\[\e[1;33m\]\d \[\e[1;34m\]\t \[\e[1;35m\]\u\[\e[1;36m\]@\[\e[1;31m\]\h\[\e[1;33m\](\[\e[1;36m\]\w\[\e[1;33m\])\[\e[1;35m\]]\[\e[1;37m\]% \e[m' | |
alias docs='cd ~/Documents' | |
alias h=history | |
alias mx="chmod a+x" | |
alias ll='ls -lh' | |
alias la='ls -lhA' | |
alias l='ls' | |
alias c='clear' | |
alias x='exit' | |
alias q='exit' | |
alias mv='mv -iv' | |
alias cp='cp -iv' | |
alias df='df -h' | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
alias show='defaults write com.apple.finder AppleShowAllFiles YES; | |
killall Finder /System/Library/CoreServices/Finder.app' | |
alias hide='defaults write com.apple.finder AppleShowAllFiles NO; | |
killall Finder /System/Library/CoreServices/Finder.app' | |
# handy short cuts # | |
alias h='history' | |
alias j='jobs -l' | |
# yyyy/mm/dd/hh/mm/ss/ffffff | |
alias now='date "+%Y_%m_%d_%H_%M_%S"' | |
# move up directories (i.e. "up" or "up 3") | |
up(){ | |
local d="" | |
limit=$1 | |
for ((i=1 ; i <= limit ; i++)) | |
do | |
d=$d/.. | |
done | |
d=$(echo $d | sed 's/^\///') | |
if [ -z "$d" ]; then | |
d=.. | |
fi | |
cd $d | |
} | |
# create DIR then CD into it... | |
function mkcdr { | |
mkdir -p -v $1 | |
cd $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment