-
Notifications
You must be signed in to change notification settings - Fork 1
/
.zshrc
109 lines (81 loc) · 1.89 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
101
102
103
104
105
106
107
108
109
###########
# GENERAL #
###########
eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH="$HOME/.bin:$PATH"
export EDITOR=atom
export GIT_EDITOR=nano
# Enable colors
export LSCOLORS=Gxfxcxdxbxegedabagacad
# Enable colors in the terminal
autoload -U colors && colors
# Allow specifying named periods (e.g.: today, now etc.)
autoload -U age
. ~/.dotfiles/aliases
. ~/.dotfiles/functions
. ~/.dotfiles/misc
###########
# History #
###########
# Configure history
HISTFILE=~/.zhistory
HISTSIZE=500000
SAVEHIST=1000000
setopt incappendhistory
setopt no_share_history
#######
# ZSH #
#######
# Navigate through directories without explicitly typing `cd`
setopt autocd
# Beep on wrong commands and on ambiguous completion
setopt beep listbeep
# Print an error instead of leaving a filename generation pattern unchanged in the argument list
setopt nomatch
# Ignores lines starting with '#'
setopt interactivecomments
# Disable spelling correction for commands and arguments
unsetopt correctall
# Don't accidentally overwrite files. Use `>!` instead of `>` if you really want to
setopt noclobber
# Enable command substitution in the prompt
setopt promptsubst
# Bind keys, Emacs-style
bindkey -e
##############
# Completion #
##############
# Activate zsh-completions
fpath=(/opt/homebrew/share/zsh-completions $fpath)
# Configure completion
autoload -Uz compinit
compinit
# Use arrow keys for completion
zstyle ':completion:*' menu select
#########
# Hooks #
#########
# This also helps keeping the same directory when opening a new tab
precmd () {
# Set tab title
print -Pn "\e]1;%~\a"
# Set window title
print -Pn "\e]2;%n@%m: %~\a"
}
preexec () {
# Set tab title
print -Pn "\e]1;%~\a"
# Set window title
print -Pn "\e]2;%n@%m: %~\a"
}
##########
# Prompt #
##########
. ~/.dotfiles/prompt
########
# Misc #
########
. ~/.dotfiles/ruby
. ~/.dotfiles/python
# . ~/.dotfiles/elixir
. ~/.dotfiles/node