From 0b130967c70dcccf9aac6961fc8609e3166f33ab Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 21 Oct 2022 12:27:46 +0800 Subject: Update --- tools/init/load-settings.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'tools') diff --git a/tools/init/load-settings.sh b/tools/init/load-settings.sh index 83c3d58..d6c9f00 100755 --- a/tools/init/load-settings.sh +++ b/tools/init/load-settings.sh @@ -6,7 +6,7 @@ export TERM=xterm-256color export XDG_CONFIG_HOME=~/.config # Get current shell -export shell=$(/dev/null; then fi # Set zsh or bash -if [[ $shell == zsh ]]; then - setopt extended_glob - fpath=($SETTING_DIR/zsh $fpath) - compinit - alias history='history -i' +if [[ $- =~ i ]]; then + if [[ $shell == zsh ]]; then + setopt extended_glob + fpath=($SETTING_DIR/zsh $fpath) + compinit + alias history='history -i' - #autoload -U deer - #zle -N deer - #bindkey '\ek' deer - bindkey -s '\ek' 'fzf_preview ' -elif [[ $shell == bash ]]; then - shopt -s extglob - HISTTIMEFORMAT='%Y-%m-%d %T ' + #autoload -U deer + #zle -N deer + #bindkey '\ek' deer + bindkey -s '\ek' 'fzf_preview ' + elif [[ $shell == bash ]]; then + shopt -s extglob + HISTTIMEFORMAT='%Y-%m-%d %T ' - bind -m emacs-standard -x '"\ek": fzf_preview' + bind -m emacs-standard -x '"\ek": fzf_preview' + fi fi # Working DIR -- cgit v1.2.3-70-g09d2