Skip to content

Instantly share code, notes, and snippets.

@RichardPovinelli
Created November 5, 2012 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RichardPovinelli/4018339 to your computer and use it in GitHub Desktop.
Save RichardPovinelli/4018339 to your computer and use it in GitHub Desktop.
.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
Copy link
Author

Ubuntu .bashrc

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