-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc
75 lines (63 loc) · 1.88 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
setopt combiningchars
setopt interactive
setopt login
setopt monitor
setopt prompt_subst
setopt zle
setopt appendhistory extendedglob nomatch
HISTSIZE=100000000
SAVEHIST=100000000
HISTFILE=~/.zsh_history
setopt HIST_IGNORE_SPACE
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
autoload -Uz vcs_info
autoload -U colors && colors
zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git cvs svn
zstyle ':completion:*:*:git:*' enable
vcs_info_wrapper() {
vcs_info
if [ -n "$vcs_info_msg_0_" ]; then
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
fi
}
cdm () {
subdir=$1
if [[ -z $subdir ]]; then
cd ~/dev/metrilio
else
cd ~/dev/metrilio/$subdir
fi
}
add_local () {
domain=$1
echo "127.0.0.1 $domain.metrilio.test" | sudo tee -a /etc/hosts
}
alias run-help=man
alias which-command=whence
export PROMPT='[%T]%{$fg[red]%} %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%} %(?.✔.✗) '
export RPROMPT='$(vcs_info_wrapper)'
export PATH="./exec:.:/usr/local/bin/:/usr/local/sbin/:~/.cargo/bin/:$PATH"
eval "$(rbenv init -)"
export EDITOR="vim"
fpath=(/usr/local/share/zsh-completions $fpath)
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export TBG_DB="metrilio_dev"
alias ls='exa -l'
alias tbg='itermocil --here tbg'
alias dl-mp3="youtube-dl --extract-audio --audio-format mp3"
alias rsp="rails s -p "
alias rs="TZ=UTC rails s"
alias lrs="ssh -R 3000:localhost:3000 [email protected] -p 2222"
alias rc="TZ=UTC rails c"
alias cat="bat"
export FZF_DEFAULT_COMMAND='rg --files'
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh