Skip to content

Instantly share code, notes, and snippets.

@hanneslsm
Last active October 4, 2021 06:53
Show Gist options
  • Save hanneslsm/08edb1a7b2f181a1141e0b8ed9e0a1e6 to your computer and use it in GitHub Desktop.
Save hanneslsm/08edb1a7b2f181a1141e0b8ed9e0a1e6 to your computer and use it in GitHub Desktop.
My .bash_profile settings
# Change Prompt
# ------------------------------------------------------------
# export PS1="| \w @ \h (\u) \n| => "
# export PS2="| => "
if [ "`id -u`" -eq 0 ]; then
PS1="________________________________________________________________________________\n\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1;31m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]"
else
PS1="________________________________________________________________________________\n\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]"
fi
# Set Paths
# ------------------------------------------------------------
export PATH="$PATH:/usr/local/bin/"
export PATH="/usr/local/git/bin:/sw/bin/:/usr/local/bin:/usr/local/:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
# Default editor
# ------------------------------------------------------------
export EDITOR=/Applications/Atom.app/Contents/MacOS/Atom
# Use colors
# ------------------------------------------------------------
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Alias
# ------------------------------------------------------------
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
alias c='clear' # c: Clear terminal display
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder
alias atom="/Applications/Atom.app/Contents/MacOS/Atom" # Opens any file in atom editor
alias casino="cd ~/LocalFiles/htdocs/wordpress/wp-content/themes/casino" # Opens casino Theme
alias colony="cd ~/LocalFiles/htdocs/nero/wp-content/themes/nero" # Opens nero Theme
alias candor="cd ~/LocalFiles/htdocs/candor"
# lr: Full Recursive Directory Listing
# ------------------------------------------
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment