-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc.zsh
67 lines (50 loc) · 1.6 KB
/
zshrc.zsh
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
64
65
66
67
# Setup automcompletion
fpath=(~/.zsh/completions $fpath)
autoload -U compinit
compinit
autoload -U zmv
alias mmv='noglob zmv -W'
# Vi key bindings
bindkey -e
# Includes
. ~/.zsh/functions.zsh
. ~/.zsh/completions.zsh
. ~/.zsh/colours.zsh
. ~/.zsh/aliases.zsh
. ~/.zsh/key_bindings.zsh
. ~/.zsh/prompt.zsh
. ~/.zsh/iterm.zsh
. ~/.zsh/ruby.zsh
# Command history
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=100000
setopt autocd
# Directory history
DIRSTACKSIZE=10
setopt autopushd pushdminus pushdsilent pushdtohome
stty stop undef
setopt extended_glob
# If I am using vi keys, I want to know what mode I'm currently using.
# zle-keymap-select is executed every time KEYMAP changes.
# From http://zshwiki.org/home/examples/zlewidgets
function zle-keymap-select {
VIMODE="${${KEYMAP/vicmd/ M:command}/(main|viins)/}"
zle reset-prompt
}
zle -N zle-keymap-select
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
ttyctl -f # The -f option freezes the tty, enabling vim to receive <C-s> commands
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
GPG_TTY=$(tty)
export GPG_TTY
# See here for details:
# https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html#Invoking-GPG_002dAGENT
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/aws-okta aws-okta
# enable comments on the command line
setopt interactivecomments
autoload -Uz compinit && compinit
. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash