From 6dcf4856ab6909205d16fa53152da83bbcf01104 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Mar 2023 20:47:19 -0600 Subject: [PATCH] reorder bash stuff Signed-off-by: Jeff Carr --- bashrc/.wit | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/bashrc/.wit b/bashrc/.wit index e286960..439908d 100644 --- a/bashrc/.wit +++ b/bashrc/.wit @@ -1,3 +1,8 @@ +case "$-" in +*i*) echo This shell is interactive ;; +*) return ;; +esac + # set -x # Some more alias to avoid making mistakes: @@ -15,27 +20,6 @@ if [ "x$WIT_USER" == "x" ]; then export WIT_USER=$USER fi -# read in custom bash settings if you want -#if [ -f ~/jcarr/bashrc/.jcarr ] && ! shopt -oq posix; then -# . ~/jcarr/bashrc/.jcarr -#fi - -# read in custom bash settings if you want -case "$WIT_USER" in -jcarr2) - . ~/jcarr/bashrc/.jcarr - ;; -*) - if [ -f ~/$WIT_USER/bashrc/.$WIT_USER ] && ! shopt -oq posix; then - . ~/$WIT_USER/bashrc/.$WIT_USER - fi - ;; -esac - -case "$-" in -*i*) echo This shell is interactive ;; -*) return ;; -esac # export PS1='\h:\w\$ ' umask 022 @@ -96,6 +80,19 @@ if [ $? == 0 ]; then neofetch fi + +# read in custom bash settings if you want +case "$WIT_USER" in +jcarr2) + . ~/jcarr/bashrc/.jcarr + ;; +*) + if [ -f ~/$WIT_USER/bashrc/.$WIT_USER ] && ! shopt -oq posix; then + . ~/$WIT_USER/bashrc/.$WIT_USER + fi + ;; +esac + if [[ $(type -t _git_wit) == function ]]; then echo "wit bash completion already exists" else