-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
82 lines (64 loc) · 1.65 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
export EDITOR=vim
export CLICOLOR=TRUE
# enable git prompt
export USE_GIT=true
# exports for golang
export GOPATH=$HOME/.go
# optouts
export DOTNET_CLI_TELEMETRY_OPTOUT=true
fpath=($fpath $HOME/.zsh/func)
typeset -U fpath
# linux only alias
if [[ `uname` == "Linux" ]]; then
alias ls="ls --color=auto"
fi
# simple posix alias commands
alias ts='date -u "+%Y%m%d%H%M%S"'
alias ll='ls -al'
# homebrew on macOS
if [ -s "/opt/homebrew/bin/brew" ]; then
export HOMEBREW_NO_ANALYTICS=1
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# node version manager
if [ -s "$HOME/.nvm/nvm.sh" ]; then
. "$HOME/.nvm/nvm.sh"
. "$HOME/.nvm/bash_completion"
fi
# python env manager
if [ -s "$HOME/.pyenv/bin/pyenv" ]; then
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
fi
# dotnet core cli
if [ -s "/usr/local/share/dotnet" ]; then
export PATH="$PATH:/usr/local/share/dotnet"
fi
# java version manager
if [ -s "$HOME/.sdkman" ]; then
. "$HOME/.sdkman/bin/sdkman-init.sh"
fi
# secret env variables
[[ -s "$HOME/.zsh/secret" ]] && . "$HOME/.zsh/secret"
# ruby version manager
if [ -s "$HOME/.rvm" ]; then
export PATH="$PATH:$HOME/.rvm/bin"
. "$HOME/.rvm/scripts/rvm"
fi
setopt prompt_subst
autoload -U zgit; zgit
autoload -U zsvn; zsvn
autoload -U zmer; zmer
autoload -U zsig; zsig
autoload -U zcolors; zcolors
autoload -U promptinit; promptinit
autoload -U colors; colors
autoload -U zcuts; zcuts
HISTSIZE=1000
SAVEHIST=1000
# red, green, blue, white, yellow, magenta, cyan, black, default
PROMPT="$zc[cyan]%m$zc[white]:$zc[green]%n"
PROMPT+="\$(zgit_prompt)"
PROMPT+="\$(zsvn_prompt)"
PROMPT+="\$(zmer_prompt)"
PROMPT+="$zc[white]:$zc[yellow]%1~ %% $zc[reset]"