diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-22 12:47:46 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-22 12:47:46 +1200 |
commit | 802b844cfdc62ad442f623b50eec8b61ae38d6af (patch) | |
tree | 4f84abd3b3bc2e207d66aa787f67e0e57f15b49f | |
parent | Set dirspell and globstar options. (diff) | |
download | dotfiles-802b844cfdc62ad442f623b50eec8b61ae38d6af.tar.gz dotfiles-802b844cfdc62ad442f623b50eec8b61ae38d6af.zip |
Check option existence before setting.
I was hoping this wouldn't be necessary, but it seems it is.
-rw-r--r-- | bash/bashrc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bash/bashrc b/bash/bashrc index 70ee5f67..bd06783a 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -15,28 +15,28 @@ HISTTIMEFORMAT='%F %T ' unset MAILCHECK # Autocorrect fudged paths in cd calls. -shopt -s cdspell +shopt cdspell &>/dev/null && shopt -s cdspell # Update columns and rows if window size changes. -shopt -s checkwinsize +shopt checkwinsize &>/dev/null && shopt -s checkwinsize # Put multi-line commands onto one line of history. -shopt -s cmdhist - -# Autocorrect fudged paths during completion. -shopt -s dirspell +shopt cmdhist &>/dev/null && shopt -s cmdhist # Include dotfiles in pattern matching. -shopt -s dotglob +shopt dotglob &>/dev/null && shopt -s dotglob # Enable advanced pattern matching. -shopt -s extglob - -# Enable double-starring paths. -shopt -s globstar +shopt extglob &>/dev/null && shopt -s extglob # Append rather than overwrite Bash history. -shopt -s histappend +shopt histappend &>/dev/null && shopt -s histappend + +# Autocorrect fudged paths during completion. +shopt dirspell &>/dev/null && shopt -s dirspell + +# Enable double-starring paths. +shopt globstar &>/dev/null && shopt -s globstar # Simple prompt. PS1='\u@\h:\w\$ ' |