forked from mscoutermarsh/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
66 lines (51 loc) · 1.69 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
# typo correction prompt
# export SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
setopt appendhistory histignoredups
setopt histignorespace extended_history
setopt INC_APPEND_HISTORY share_history
SAVEHIST=8096
HISTSIZE=8096
export VISUAL=vim
export EDITOR=$VISUAL
set -o emacs
# prompt
eval "$(starship init zsh)"
# plugins
SYNTAX="/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
[[ -f "$SYNTAX" ]] && source "$SYNTAX"
SUBSTR_SEARCH="/opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
if [[ -f "$SUBSTR_SEARCH" ]]; then
source "$SUBSTR_SEARCH"
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
export HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE="true"
fi
if (( $+commands[brew] )); then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
fi
if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
fi
# aliases
[[ -f ~/.aliases.zsh ]] && source ~/.aliases.zsh
# aliases-local
[[ -f ~/.aliases_local.zsh ]] && source ~/.aliases_local.zsh
# make ag call tag by default
if (( $+commands[tag] )); then
tag() { command tag "$@"; source ${TAG_ALIAS_FILE:-/tmp/tag_aliases} 2>/dev/null }
fi
if (( $+commands[bat] )); then
export BAT_THEME='base16'
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
fi
# Base16 Shell
BASE16_SHELL_PATH="$HOME/.config/base16-shell"
[ -n "$PS1" ] && \
[ -s "$BASE16_SHELL_PATH/profile_helper.sh" ] && \
source "$BASE16_SHELL_PATH/profile_helper.sh"
export CARGO_NET_GIT_FETCH_WITH_CLI='true'
export GIT_SSH_COMMAND='ssh -o Hostname=github.com'