-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc
62 lines (53 loc) · 1.85 KB
/
zshrc
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
export EDITOR=vim
# History:
export HISTFILE=~/.zsh_history
export HISTFILESIZE=100000000 # Max number of lines
export HISTSIZE=100000
export SAVEHIST=50000 # < HISTSIZE to give HIST_EXPIRE_DUPS_FIRST some cushion
setopt HIST_EXPIRE_DUPS_FIRST # Trim oldest duplicates first
setopt INC_APPEND_HISTORY # Immediate append; don't lose history on unclean exit
export HISTTIMEFORMAT="[%F %T] "
setopt EXTENDED_HISTORY # Format: `: <beginning time>:<elapsed seconds>;<command>'
setopt HIST_IGNORE_SPACE # Don't record commands with leading space
# Enable completion:
autoload -Uz compinit && compinit
autoload bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws
# Case-insensitive completion:
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*'
# Completion colors:
zstyle -e\
':completion:*:default' list-colors\
'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==02=01}:${(s.:.)LS_COLORS}")'
# Prompt setup:
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
# Show `user@host` when away from home
export PROMPT='%n@%M %F{245}%~%f %# '
else
export PROMPT='%F{245}%~%f %# '
fi
# To get $PROMPT to play nice with virtualenv:
plugins=(virtualenv)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status virtualenv)
# Aliases:
alias rm='rm -i' # Ask for confirmation
case `uname` in # OS specific aliases
Darwin)
export LSCOLORS=ExGxcxdxCxegedabagacad
alias ls='ls -G'
alias ll='ls -laG'
;;
Linux)
alias ll='ls -la --color'
;;
esac
# Misc. external commands:
source $HOME/.aws_shorthands
export PATH=~/bin:$PATH # Home directory binaries
[ -f ~/.localzshrc ] && source ~/.localzshrc # Anything specific to a particular host
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi