dotfiles/.bashrc

32 lines
890 B
Bash
Raw Normal View History

2012-04-05 05:39:31 -04:00
# Common parameters
if [ "$OSTYPE" == "linux-gnu" ]; then
alias ls='ls -v --color=auto'
alias ll='ls -lav'
alias grep='grep --color'
else
alias ls='ls'
alias ll='ls -la'
alias grep='grep'
fi
2012-04-05 05:39:31 -04:00
2012-08-14 14:26:28 -04:00
alias dotfiles='cd; curl -#L https://github.com/atomaka/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README,.gitignore}; source ~/.profile'
2012-09-27 17:14:37 -04:00
alias npdev='sshfs -o idmap=user -o workaround=rename $USER@netprint:/data/test ~/Source/netprint'
2012-08-14 14:26:28 -04:00
2012-09-13 22:44:08 -04:00
alias gvim='gvim -f &'
2012-04-05 05:39:31 -04:00
# Case insensitive matching
2012-05-15 14:50:49 -04:00
shopt -s nocaseglob
2012-07-19 15:39:23 -04:00
PS1="\e[1;34m[\t] \w\n"
2012-07-19 15:39:23 -04:00
# Prompt color based on location
if [ "$SSH_CONNECTION" == "" ]; then
# Yellow prompt for local login
PS1="$PS1\[\e[1;32m\][\u@\h]"
2012-07-19 15:39:23 -04:00
else
PS1="$PS1\[\e[1;33m\][\u@\h]"
2012-07-19 15:39:23 -04:00
fi
# Ripped from Doug - color based on return code
PS1="$PS1\$(if [ \$? = 0 ]; then echo -e \"\$\"; else echo -e \"\[\033[0;31m\]\$\"; fi)\[\033[0m\] "