blob: 5fd52db3cc4ceeb496cc0177ab0b375989649310 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# -*- mode: sh; -*-
source ${ZPLUG_HOME:-~/projects/zplug}/init.zsh
zplug "zsh-users/zsh-completions"
zplug "mafredri/zsh-async"
zplug "sindresorhus/pure"
zplug "Tarrasch/zsh-autoenv", as:plugin
zplug "clvv/fasd", hook-build:"PREFIX=$HOME make install"
zplug "tymm/zsh-directory-history", as:command, use:"dir{hist,log}"
zplug "tymm/zsh-directory-history", as:plugin
if zplug check Tarrasch/zsh-autoenv
then
AUTOENV_FILE_ENTER=.envrc
AUTOENV_HANDLE_LEAVE=0
AUTOENV_LOOK_UPWARDS=1
fi
# Then, source plugins and add commands to $PATH
zplug load
# General configuration
setopt auto_cd # Change directories without `cd`
if zplug check zsh-users/zsh-completions
then
autoload -U compinit && compinit
fi
if zplug check sindresorhus/pure
then
PURE_GIT_PULL=0
autoload -Uz promptinit && promptinit
prompt pure &> /dev/null
fi
if zplug check clvv/fasd
then
if [[ -n $commands[fasd] ]]
then
_FASD_DATA="$HOME/.cache/zsh/fasd-data"
source =fasd
fasd_cache="$HOME/.fasd-init-zsh"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
else
echo "no fasd"
fi
fi
if zplug check tymm/zsh-directory-history
then
unsetopt flow_control # Let me use ^S and ^Q
# bindkey '\e[A' directory-history-search-backward
# bindkey '\e[B' directory-history-search-forward
bindkey -M emacs '^R' history-substring-search-up
bindkey -M emacs '^S' history-substring-search-down
fi
|