-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
58 lines (41 loc) · 1.47 KB
/
zshrc
File metadata and controls
58 lines (41 loc) · 1.47 KB
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
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="sorin"
zstyle ':omz:update' mode reminder # just remind me to update when it's time
zstyle ':omz:update' frequency 20
zstyle ':omz:plugins:nvm' autoload yes
# Uncomment the following line if pasting URLs and other text is messed up.
DISABLE_MAGIC_FUNCTIONS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="dd/mm/yyyy"
plugins=(
dotenv
)
source $ZSH/oh-my-zsh.sh
# Python Version Manager (PYENV)
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Node Version Manager (NVM)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Ruby Version Manager (RVM)
export PATH="$PATH:$HOME/.rvm/bin"
export MANPATH="/usr/local/man:$MANPATH"
export LANG=en_US.UTF-8
# Kubernetes current context
function kubectx_prompt() {
local k8s_ctx=$(kubectl config current-context 2>/dev/null)
[[ -n "$k8s_ctx" ]] && echo "%F{white}k8s:%B%F{blue}($k8s_ctx)%b%f "
}
# Git current branch
function git_branch_prompt() {
local branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
[[ -n "$branch" ]] && echo "%F{white}git:%B%F{blue}($branch)%b%f "
}
autoload -U colors && colors
PROMPT='$(kubectx_prompt)$(git_branch_prompt)%F{white}%c ❯'
# https://github.com/ohmyzsh/ohmyzsh/issues/449#issuecomment-1466968
unsetopt extendedglob
unsetopt EXTENDED_GLOB