Create a gist now

Instantly share code, notes, and snippets.

.bashrc
#!/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
@RichardPovinelli
Owner

Ubuntu .bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment