From 6517bfab3e42a22197133d4084c9f0e3f2c2f3b5 Mon Sep 17 00:00:00 2001 From: James Dixon Date: Tue, 17 May 2022 20:58:50 -0400 Subject: [PATCH] add shopt checks --- config/bash/.bashrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/bash/.bashrc b/config/bash/.bashrc index 19e8e58..06abd2e 100644 --- a/config/bash/.bashrc +++ b/config/bash/.bashrc @@ -16,9 +16,12 @@ HISTCONTROL="ignoreboth:erasedups" HISTTIMEFORMAT="%F %T " # shell options -shopt -s checkhash checkjobs checkwinsize -shopt -s dirspell extglob globstar -shopt -s cmdhist histappend +if ! shopt -q checkhash 2> /dev/null; then shopt -s checkhash fi +if ! shopt -q checkwinsize 2> /dev/null; then shopt -s checkwinsize; fi +if ! shopt -q cmdhist 2> /dev/null; then shopt -s cmdhist; fi +if ! shopt -q histappend 2> /dev/null; then shopt -s histappend; fi +if ! shopt -q extglob 2> /dev/null; then shopt -s extglob; fi +if ! shopt -q globstar 2> /dev/null; then shopt -s globstar; fi # command variables export EDITOR="/usr/bin/vim"