From f4acf456dd8efc21e2b1ac16f5040d6b1d19d9ef Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 9 Sep 2021 12:20:12 +0800 Subject: update --- tools/init/load-settings.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/init/load-settings.sh b/tools/init/load-settings.sh index 1d375d0..1b8b4b7 100755 --- a/tools/init/load-settings.sh +++ b/tools/init/load-settings.sh @@ -4,12 +4,15 @@ source $SETTING_DIR/alias [[ -d $SETTING_DIR/private ]] && source $SETTING_DIR/private/* # Config shell -if [[ $SHELL =~ zsh$ ]]; then - setopt extended_glob - fpath=($SETTING_DIR/zsh $fpath) -elif [[ $SHELL =~ bash$ ]]; then - shopt -s extglob -fi +case $0 in + zsh) + setopt extended_glob + fpath=($SETTING_DIR/zsh $fpath) + ;; + bash) + shopt -s extglob + ;; +esac # set default editor export EDITOR=vim -- cgit v1.2.3-70-g09d2