aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-02-21 11:35:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2012-02-21 11:35:45 +1300
commit6c33d7e66d3110cc59f0dc22638763f894f9c364 (patch)
tree3dd66be14086b8ee41b0bcc9c903c1850c666c9f /bash/bashrc
parentvi-ish copy paste (diff)
downloaddotfiles-6c33d7e66d3110cc59f0dc22638763f894f9c364.tar.gz
dotfiles-6c33d7e66d3110cc59f0dc22638763f894f9c364.zip
Added bash files, wrote installation script.
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc42
1 files changed, 42 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
new file mode 100644
index 00000000..dc60e9d3
--- /dev/null
+++ b/bash/bashrc
@@ -0,0 +1,42 @@
+# Don't do anything if not running interactively.
+[ -z "$PS1" ] && return
+
+# Don't put duplicate lines in history, and keep plenty of it.
+HISTCONTROL=ignoreboth
+HISTSIZE=5000
+
+# Append rather than overwrite Bash history.
+shopt -s histappend
+
+# Update columns and rows if window size changes.
+shopt -s checkwinsize
+
+# Simple prompt.
+PS1='\u@\h:\w\$ '
+
+# Use colors for ls and grep, if available.
+if [ -x /usr/bin/dircolors ]; then
+ eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ alias grep='grep --color=auto'
+fi
+
+# Use completion, if available.
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
+
+# SSH agent setup, if available.
+if [ -e ~/.bash_sshagent ]; then
+ . ~/.bash_sshagent
+fi
+
+# Turn off annoying and useless flow control keys.
+stty -ixon
+
+# Use vim as my text editor, if available.
+hash vim &>/dev/null
+if [ $? -eq 0 ]; then
+ export EDITOR=vim
+fi
+