aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/init
diff options
context:
space:
mode:
Diffstat (limited to 'tools/init')
-rwxr-xr-xtools/init/load-settings.sh30
1 files changed, 16 insertions, 14 deletions
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
6export XDG_CONFIG_HOME=~/.config 6export XDG_CONFIG_HOME=~/.config
7 7
8# Get current shell 8# Get current shell
9export shell=$(</proc/$$/cmdline tr -d '[\0\-]') 9export shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]')
10shell=${shell##*/} 10shell=${shell##*/}
11 11
12# load custom aliases 12# load custom aliases
@@ -45,21 +45,23 @@ if which fzf &>/dev/null; then
45fi 45fi
46 46
47# Set zsh or bash 47# Set zsh or bash
48if [[ $shell == zsh ]]; then 48if [[ $- =~ i ]]; then
49 setopt extended_glob 49 if [[ $shell == zsh ]]; then
50 fpath=($SETTING_DIR/zsh $fpath) 50 setopt extended_glob
51 compinit 51 fpath=($SETTING_DIR/zsh $fpath)
52 alias history='history -i' 52 compinit
53 alias history='history -i'
53 54
54 #autoload -U deer 55 #autoload -U deer
55 #zle -N deer 56 #zle -N deer
56 #bindkey '\ek' deer 57 #bindkey '\ek' deer
57 bindkey -s '\ek' 'fzf_preview ' 58 bindkey -s '\ek' 'fzf_preview '
58elif [[ $shell == bash ]]; then 59 elif [[ $shell == bash ]]; then
59 shopt -s extglob 60 shopt -s extglob
60 HISTTIMEFORMAT='%Y-%m-%d %T ' 61 HISTTIMEFORMAT='%Y-%m-%d %T '
61 62
62 bind -m emacs-standard -x '"\ek": fzf_preview' 63 bind -m emacs-standard -x '"\ek": fzf_preview'
64 fi
63fi 65fi
64 66
65# Working DIR 67# Working DIR