diff options
Diffstat (limited to 'tools/init/load-settings.sh')
-rwxr-xr-x | tools/init/load-settings.sh | 30 |
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 | |||
6 | export XDG_CONFIG_HOME=~/.config | 6 | export XDG_CONFIG_HOME=~/.config |
7 | 7 | ||
8 | # Get current shell | 8 | # Get current shell |
9 | export shell=$(</proc/$$/cmdline tr -d '[\0\-]') | 9 | export shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]') |
10 | shell=${shell##*/} | 10 | shell=${shell##*/} |
11 | 11 | ||
12 | # load custom aliases | 12 | # load custom aliases |
@@ -45,21 +45,23 @@ if which fzf &>/dev/null; then | |||
45 | fi | 45 | fi |
46 | 46 | ||
47 | # Set zsh or bash | 47 | # Set zsh or bash |
48 | if [[ $shell == zsh ]]; then | 48 | if [[ $- =~ 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 ' |
58 | elif [[ $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 | ||
63 | fi | 65 | fi |
64 | 66 | ||
65 | # Working DIR | 67 | # Working DIR |