aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-02-21 22:54:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2012-02-21 22:54:21 +1300
commite42dd83ffbd8e26d3a5bb57db987731ddabf0b20 (patch)
tree56a70a868a8e8b71ef1fed98ed09633e2c50b671 /bash/bashrc
parentAdd environment variables. (diff)
downloaddotfiles-e42dd83ffbd8e26d3a5bb57db987731ddabf0b20.tar.gz
dotfiles-e42dd83ffbd8e26d3a5bb57db987731ddabf0b20.zip
Still tweaking bashrc.
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc27
1 files changed, 21 insertions, 6 deletions
diff --git a/bash/bashrc b/bash/bashrc
index b8d97eed..59e34eb3 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -1,18 +1,33 @@
# Don't do anything if not running interactively.
[ -z "$PS1" ] && return
-# Don't put duplicate lines in history, and keep plenty of it.
+# Keep plenty of history.
+unset HISTFILESIZE
+HISTSIZE=1000000
+
+# Ignore duplicate commands and whitespace in history.
HISTCONTROL=ignoreboth
-HISTSIZE=5000
-# Append rather than overwrite Bash history.
-shopt -s histappend
+# Keep the times of the commands in history.
+HISTTIMEFORMAT="%F %T "
+
+# Add all commands to the history immediately.
+PROMPT_COMMAND="history -a; history -n"
+
+# Autocorrect fudged paths in cd calls.
+shopt -s cdspell
# Update columns and rows if window size changes.
shopt -s checkwinsize
+# Put multi-line commands onto one line of history.
+shopt -s cmdhist
+
+# Append rather than overwrite Bash history.
+shopt -s histappend
+
# Simple prompt.
-PS1='\u@\h:\w\$ '
+PS1="\u@\h:\w\$ "
# Use colors for ls and grep, if available.
if [ -x /usr/bin/dircolors ]; then
@@ -22,7 +37,7 @@ if [ -x /usr/bin/dircolors ]; then
fi
# Use completion, if available.
-if [ -f /etc/bash_completion ]; then
+if [ -e /etc/bash_completion ]; then
. /etc/bash_completion
fi