Skip to content

Commit

Permalink
updated bashrc based on 1604 ubuntu skel file
Browse files Browse the repository at this point in the history
  • Loading branch information
rcampbel3 committed Jun 14, 2016
1 parent 8d2bb6d commit 7524d16
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return
case $- in
*i*) ;;
*) return;;
esac

# Don't put duplicate lines or lines starting with space in the history.
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# Append to the history file, don't overwrite it
# append to the history file, don't overwrite it
shopt -s histappend

# Save multi-line commands as one command
# save multi-line commands as one command
shopt -s cmdhist

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=10000

# Check the window size after each command and, if necessary,
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

Expand All @@ -31,13 +34,13 @@ shopt -s checkwinsize
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
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) color_prompt=yes;;
xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
Expand Down Expand Up @@ -94,6 +97,9 @@ if [ -x /usr/bin/dircolors ]; then
alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
Expand All @@ -115,9 +121,14 @@ 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 ] && ! shopt -oq posix; then
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

###
# vettersoftware.com customizations below
#
Expand All @@ -127,8 +138,7 @@ set -o vi
export EDITOR=vim
# Set better prompt for mysql
# colors don't work in mysql >= 5.6 :( - https://bugs.mysql.com/bug.php?id=79755
#MYSQL_PS1='\033]0;MySQL \h:\p (\d)\007\e[0;31m\h\e[0m (\p)\n\d> '
export MYSQL_PS1=$(echo -e "\033]0;\u@\h [\d]\007\u@\h [\d]> ")
export MYSQL_PS1="(\u@\h) [\d]> "
# set better color default for hh/hstr - enhanced history tool
# https://github.com/dvorka/hstr
export HH_CONFIG=hicolor
Expand Down

0 comments on commit 7524d16

Please sign in to comment.