Last active
May 21, 2020 15:22
-
-
Save esalaverria/7a059fec3e35d278b2a9dc0d838c39a5 to your computer and use it in GitHub Desktop.
.bash_profile for iTerm2 color highlights and customizations
This file contains 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
source ~/.profile | |
export HTDOCS="/Applications/MAMP/htdocs" | |
export EDITOR="/Applications/Atom.app/Contents/MacOS/Atom -nw" | |
export PATH="/Users/kike/Library/Python/3.7/bin:$PATH" | |
#test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" | |
[[ -s ~/.bashrc ]] && source ~/.bashrc | |
#export CLICOLOR=1 | |
#export LSCOLORS=GxFxCxDxBxegedabagaced | |
## | |
## NAVIGATION aliases | |
## | |
alias ls='ls -GFh' | |
## Use a long listing format ## | |
alias ll='ls -l' | |
## Show hidden files ## | |
alias l.='ls -d .*' | |
## get rid of command not found ## | |
alias cd..='cd ..' | |
## a quick way to get out of current directory ## | |
alias ..='cd ..' | |
## Make mount command output pretty and human readable format## | |
alias mount='mount |column -t' | |
## New set of commands ## | |
alias path='echo -e ${PATH//:/\\n}' | |
## Change to and list contents of a directory ## | |
function cdl { cd $1; ls; } | |
## Shortcuts to directories ## | |
alias home='cd ~/' | |
alias nodeplay='cd ~/Nodeplay' | |
alias github='cd ~/Github' | |
alias sites='cd ~/Sites' | |
## | |
## UTILITIES aliases | |
## | |
## Open Sublime Text ## | |
alias subl="open -a 'Sublime Text'" | |
## Edit Bash Profile in Sublime Text ## | |
alias bashprof='atom .bash_profile' | |
##Set Sublime as the "default" edit app from command-line | |
alias edit='atom' | |
## Open a file in desired browser ## | |
## alias ff='open -a Firefox' | |
alias chr='open -a Google Chrome' | |
alias saf='open -a Safari' | |
## | |
## UTILITIES aliases | |
## | |
alias now='date +"%T"' | |
alias nowtime=now | |
alias nowdate='date +"%d-%m-%Y"' | |
## Show open ports ## | |
alias ports='netstat -tulanp' | |
## Reload .bash_profile | |
alias rbp='source ~/.bash_profile' | |
if [ $UID -ne 0 ]; then | |
alias reboot='sudo reboot' | |
alias update='sudo apt-get upgrade' | |
fi | |
function prompt { | |
local BLACK="\[\033[0;30m\]" | |
local BLACKBOLD="\[\033[1;30m\]" | |
local RED="\[\033[0;31m\]" | |
local REDBOLD="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local GREENBOLD="\[\033[1;32m\]" | |
local YELLOW="\[\033[0;33m\]" | |
local YELLOWBOLD="\[\033[1;33m\]" | |
local BLUE="\[\033[0;34m\]" | |
local BLUEBOLD="\[\033[1;34m\]" | |
local PURPLE="\[\033[0;35m\]" | |
local PURPLEBOLD="\[\033[1;35m\]" | |
local CYAN="\[\033[0;36m\]" | |
local CYANBOLD="\[\033[1;36m\]" | |
local WHITE="\[\033[0;37m\]" | |
local WHITEBOLD="\[\033[1;37m\]" | |
local RESETCOLOR="\[\e[00m\]" | |
export PS1="$WHITEBOLD[ $RESETCOLOR$REDBOLD\u$RESETCOLOR$PURPLE@\H: $GREEN\w $RESETCOLOR$WHITEBOLD] $RESETCOLOR$GREENBOLD\$ $RESETCOLOR" | |
#export PS2=" | → $RESETCOLOR" | |
##export PS1="[ \u@\H: \w ] \$ " | |
} | |
prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment