Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
Last active November 17, 2017 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannygsmith/7a05686adf69018ad5017b8009e0b437 to your computer and use it in GitHub Desktop.
Save dannygsmith/7a05686adf69018ad5017b8009e0b437 to your computer and use it in GitHub Desktop.
Sample bash_profile for students
#source ~/.profile
# .bash_profile
mesg n
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export LESS="-X "
export PAGER=less
umask 022
export PS1='\h[\!]:\w \$ '
export SUDO_PS1='\h[\!]:\w \$ '
export EDITOR="/usr/bin/nano"
ssh-add -l &>/dev/null
if [ "$?" == 2 ]; then
test -r ~/.ssh-agent && \
eval "$(<~/.ssh-agent)" >/dev/null
ssh-add -l &>/dev/null
if [ "$?" == 2 ]; then
(umask 066; ssh-agent > ~/.ssh-agent)
eval "$(<~/.ssh-agent)" >/dev/null
ssh-add
fi
fi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h[\!]: \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lbin:$HOME/.composer/vendor/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment