/
zshrc
56 lines (41 loc) · 1.45 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
# check if this is a login shell
[ "$0" = "-zsh" ] && export LOGIN_ZSH=1
# run zprofile if this is not a login shell
[ -n "$LOGIN_ZSH" ] && source ~/.zprofile
if [[ -n "$CODESPACES" ]]
then
gh config set browser "rdm open"
fi
source "$HOME/.aliases.zsh"
# History file
export HISTFILE=~/.zsh_history
# Don't show duplicate history entires
setopt hist_find_no_dups
# Remove unnecessary blanks from history
setopt hist_reduce_blanks
# Share history between instances
setopt share_history
# Don't hang up background jobs
setopt no_hup
# use emacs bindings even with vim as EDITOR
bindkey -e
# use a quick `jj` keystroke to get into vim mode on the command line
bindkey jj vi-cmd-mode
# fix backspace on Debian
[ -n "$LINUX" ] && bindkey "^?" backward-delete-char
# alternate mappings for Ctrl-U/V to search the history
bindkey "^u" history-beginning-search-backward
bindkey "^v" history-beginning-search-forward
export PATH="/usr/local/bin:$PATH"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='ag -l --path-to-ignore ~/.ignore --nocolor --hidden -g ""'
export FZF_DEFAULT_OPTS='--color=16'
export OVERMIND_TMUX_CONFIG="$HOME/.tmux.overmind.conf"
if [[ -z "$CODESPACES" ]]
then
export PATH="$HOMEBREW_PREFIX/opt/libpq/bin:$PATH"
else
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
fi
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"