From 18f1bc15437f5eb0b687d5db776f737a2d59ae2c Mon Sep 17 00:00:00 2001 From: Geoffray Levasseur Date: Fri, 6 Oct 2023 11:22:10 +0200 Subject: [PATCH] fix bash/zsh test, some cosmetics --- profile.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/profile.sh b/profile.sh index bbfa5e7..72bbf4a 100644 --- a/profile.sh +++ b/profile.sh @@ -35,7 +35,7 @@ # * OF SUCH DAMAGE. # ------------------------------------------------------------------------------ -if [[ ! $(echo $SHELL | grep -e bash|zsh) ]]; then +if [[ ! $SHELL =~ bash|zsh ]]; then echo "That environmet script is designed to be used with bash or zsh being the shell." echo "Please consider using bash or zsh instead, or patch me ;)!" return 1 @@ -86,7 +86,7 @@ else export MYPATH=$PROFILE_PATH fi if [[ ! -e $MYPATH/profile.sh ]]; then - echo "[ Warning ] Path detection failed, using pwd..." + echo "[ Warning ] Path detection failed, trying to use pwd..." MYPATH=$(pwd) if [[ ! -e $MYPATH/profile.sh ]]; then echo "[ Error ] Impossible to determine installation path, pretty much nothing will work." @@ -106,6 +106,10 @@ fi [[ -d ~/bin ]] && pathappend ~/bin [[ -d ~/.local/bin ]] && pathappend ~/.local/bin +# ------------------------------------------------------------------------------ +# Default values are set here and will be overloaded with config file if any +# ------------------------------------------------------------------------------ + # Set bash history export HISTSIZE=50000 export HISTIGNORE="&:[bf]g:exit"