Please bear with us as we work to restore functionality to dotfiles.org.
Lot's of variables set for various programs and bash settings. Well-commented.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# When doing a 'cd', look in these directories for the destination.
# Didn't like tis, as it messes up completion too.
#export CDPATH=.:~:~/work/projects:~/work:/var/www:/usr/local:/usr/lib:/usr/share:/usr/src:/
# Ignore words ending with these suffixes, when doing tab completion.
export FIGNORE='~:.o:.svn:vmlinuz'
# Save timestamps in the history file.
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S '
# Don't add these commands to the shell history. (& = duplicate lines)
export HISTIGNORE="&:exit"
# Exit the shell if we get 4 CTRL-D in a row.
export IGNOREEOF=3
# When running less, always ignore case on searches; prompt verbosely; display colors;
# chop long lines; highlight first new line; tabs are 4 chars wide.
export LESS='-I -M -R -S -W -x4'
# Set the default editor to nano. TODO: Test for nano/pico.
export EDITOR=nano
# Highlight matching strings if grep command is run interactively.
export GREP_OPTIONS='--color=auto'
# Make sure we're using Emacs-style command-line editing, no vi-style.
set -o emacs
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Correct minor spelling errors in 'cd' commands.
shopt -s cdspell
# Expand to complete an ignored word, if no other words match.
shopt -u force_fignore
# Don't try to find all the command possibilities when hitting TAB on an empty line.
shopt -s no_empty_cmd_completion
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
#case "$TERM" in
#xterm-color)
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# ;;
#*)
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# ;;
#esac
# Comment in the above and uncomment this below for a color prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# Change color to red for root, to make it stand out more.
if [ "`id -u`" -eq 0 ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
fi
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi