Last active
November 17, 2017 13:49
-
-
Save dannygsmith/7a05686adf69018ad5017b8009e0b437 to your computer and use it in GitHub Desktop.
Sample bash_profile for students
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 | |
# .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