-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
100 lines (75 loc) · 2.36 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# History configuration:
HISTFILE=~/.hist
HISTSIZE=7500
SAVEHIST=10000
# Save timestamps with history entries
setopt INC_APPEND_HISTORY_TIME
setopt EXTENDED_HISTORY
# remove duplicates when saving the history
setopt HIST_EXPIRE_DUPS_FIRST
# ignore all entries starting with spaces
setopt HIST_IGNORE_SPACE
# just keep the most recent duplicate
setopt HIST_SAVE_NO_DUPS
#setopt SHARE_HISTORY
# skip duplicates when searching
setopt HIST_FIND_NO_DUPS
# load found entry into buffer instead of running directly
setopt HIST_VERIFY
# load completion helper functions
autoload -Uz compinit
compinit
# Python specifics.
export PYTHONDONTWRITEBYTECODE=1
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUAL_ENV_DISABLE_PROMPT=1
eval "`pip completion --zsh`"
# Go specifics
export GOPATH=$HOME/.go
export PATH=$PATH:$GOPATH/bin
# Pkg folders
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
# LD config
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# Source venv
source /usr/bin/virtualenvwrapper.sh 2> /dev/null
# Export defaults
export EDITOR=$(which nano)
export VISUAL=$(which vim)
# Export config folder
export XDG_CONFIG_HOME="$HOME/.config"
# Prompt expansion is needed.
setopt PROMPT_SUBST
# Gief colors!
autoload -U colors && colors
# Completion is nice too.
autoload -U compinit && compinit
setopt complete_in_word
setopt correct
alias reread='source $HOME/.zshrc'
source ~/.shell_aliases
source ~/.zsh_functions
# Interpret keys correctly
bindkey "^[[H" beginning-of-line # home
bindkey "^[[F" end-of-line # end
bindkey "^[[5~" up-line-or-history # page up
bindkey "^[[6~" down-line-or-history # page down
bindkey "^[[2~" overwrite-mode # insert
bindkey "^[[3~" delete-char # delete
bindkey "^[[1;5D" backward-word # jump backwards
bindkey "^[[1;5C" forward-word # jump forwards
# Set the path display length default:
path_length=1
default_title
PROMPT=$'$(return_status)$(base_prompt)$(display_path)$(display_git)$(command_runtime)\n$(shell_with_venv_info) '
# Open new tabs in the same directory:
source /etc/profile.d/vte.sh
# Forward searching with Ctrl+s
stty -ixon
# ZSH syntax hightlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Source the secrets file in home if it exists.
if [ -r $HOME/.secrets ]; then
source $HOME/.secrets
fi
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh