diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-21 22:54:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-21 22:54:21 +1300 |
commit | e42dd83ffbd8e26d3a5bb57db987731ddabf0b20 (patch) | |
tree | 56a70a868a8e8b71ef1fed98ed09633e2c50b671 /bash | |
parent | Add environment variables. (diff) | |
download | dotfiles-e42dd83ffbd8e26d3a5bb57db987731ddabf0b20.tar.gz dotfiles-e42dd83ffbd8e26d3a5bb57db987731ddabf0b20.zip |
Still tweaking bashrc.
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bash_profile | 3 | ||||
-rw-r--r-- | bash/bashrc | 27 |
2 files changed, 23 insertions, 7 deletions
diff --git a/bash/bash_profile b/bash/bash_profile index f46d8af5..7f834d4e 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,6 +1,6 @@ # If running Bash, source .bashrc. if [ -n "$BASH_VERSION" ]; then - if [ -f "$HOME/.bashrc" ]; then + if [ -e "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi @@ -13,3 +13,4 @@ fi # Environment variables. export LANG=en_NZ.UTF-8 export NCURSES_NO_UTF8_ACS=1 + 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 |