Created
November 5, 2012 17:04
-
-
Save RichardPovinelli/4018339 to your computer and use it in GitHub Desktop.
.bashrc
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
#!/bin/sh | |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Remove duplicates and unwanted commands in the bash history | |
if [ "$SHLVL" = 1 ]; then | |
[ -f $HOME/.bash_history ] && sort $HOME/.bash_history | uniq | grep -vE "^(cat|cd|exit|h|hg|la|less|ls|man|mv|rm|shutdown|vi|which|who) " > /tmp/.bash_history && cp /tmp/.bash_history $HOME/.bash_history | |
fi | |
# User specific aliases and functions | |
if [[ $TERM == xterm* ]]; then | |
export TERM='xterm-256color' | |
PS1="[\!]\\$ \[\e]2;\u@\h:\w\a\]" | |
else | |
PS1="\w\n[\!]\\$ " | |
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
export PS1 | |
export LC_COLLATE="C" | |
#export LC_ALL="C" | |
#leaves lessed text on the screen | |
export LESS="-X" | |
umask 077 #paranoid setting for files | |
# source the .bash_aliases if it exists | |
if [ -f "${HOME}/.bash_aliases" ] ; then | |
source "${HOME}/.bash_aliases" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ubuntu .bashrc