From a6d320f51d80a9f456fa65f8c715b5c0074a8ce4 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 20 Apr 2022 16:33:15 +0800 Subject: Update --- tools/init/load-settings.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/init/load-settings.sh b/tools/init/load-settings.sh index bfe643b..64bd4e5 100755 --- a/tools/init/load-settings.sh +++ b/tools/init/load-settings.sh @@ -7,15 +7,15 @@ source $SETTING_DIR/alias [[ -d $SETTING_DIR/private ]] && for f in $SETTING_DIR/private/*; do source $f; done # Config shell -SHELL=$(cat /proc/$$/cmdline | tr -d '\0' | xargs basename) +shell=$(/dev/null; then - [ -f ~/.fzf.$SHELL ] && source ~/.fzf.$SHELL + [ -f ~/.fzf.$shell ] && source ~/.fzf.$shell fzf_preview() { fzf --preview 'cat {}'; } fi -if [[ $SHELL == zsh ]]; then +if [[ $shell == zsh ]]; then setopt extended_glob fpath=($SETTING_DIR/zsh $fpath) compinit @@ -24,13 +24,12 @@ if [[ $SHELL == zsh ]]; then bindkey '\ek' deer alias history='history -i' - #zle -N fzf_preview bindkey -s "^I" 'fzf_preview ' -elif [[ $SHELL == bash ]]; then +elif [[ $shell == bash ]]; then shopt -s extglob HISTTIMEFORMAT='%Y-%m-%d %T ' - bind -x '"\C-i": "fzf_preview"' + bind -x '"\C-i":"fzf_preview"' fi # Add custom scripts into PATH -- cgit v1.2.3-70-g09d2