-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
162 lines (138 loc) · 4.56 KB
/
zshrc
File metadata and controls
162 lines (138 loc) · 4.56 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="spaceship"
# Set this to use case-sensitive completion
CASE_SENSITIVE="true"
# Uncomment following line if you want to the command execution time stamp shown
# in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="mm/dd/yyyy"
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(
git
git-flow
knife
sudo
thor
knife_ssh
tmux
docker
vagrant
helm
zsh-autosuggestions
zsh-history-substring-search
#kube-ps1
)
source $ZSH/oh-my-zsh.sh
# User configuration
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Dont share history between sessions
unsetopt share_history
# Dont save history realtime
unsetopt inc_append_history
export EDITOR=vim
alias xterm="xterm -bg black -fg white"
### Spaceship prompt
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
# hg # Mercurial section (hg_branch + hg_status)
package # Package version
node # Node.js section
# bun # Bun section
# deno # Deno section
ruby # Ruby section
python # Python section
# elm # Elm section
# elixir # Elixir section
# xcode # Xcode section
# xcenv # xcenv section
# swift # Swift section
# swiftenv # swiftenv section
# golang # Go section
# perl # Perl section
# php # PHP section
# rust # Rust section
# haskell # Haskell Stack section
# scala # Scala section
# kotlin # Kotlin section
java # Java section
# lua # Lua section
# dart # Dart section
# julia # Julia section
# crystal # Crystal section
docker # Docker section
docker_compose # Docker section
# aws # Amazon Web Services section
# gcloud # Google Cloud Platform section
# azure # Azure section
venv # virtualenv section
# conda # conda virtualenv section
uv # uv section
# dotnet # .NET section
# ocaml # OCaml section
# vlang # V section
# zig # Zig section
purescript # PureScript section
# erlang # Erlang section
# gleam # Gleam section
kubectl # Kubectl context section
# ansible # Ansible section
# terraform # Terraform workspace section
# pulumi # Pulumi stack section
# ibmcloud # IBM Cloud section
# nix_shell # Nix shell
# gnu_screen # GNU Screen section
exec_time # Execution time
async # Async jobs indicator
line_sep # Line break
battery # Battery level and status
jobs # Background jobs indicator
exit_code # Exit code section
sudo # Sudo indicator
char # Prompt character
)
### SSH Keychain
keychain ~/.ssh/id_ed25519
source ~/.keychain/$HOST-sh
# Function to extend PATH if directory not already included
_extend_path() {
[[ -d "$1" ]] || return
if ! echo "$PATH" | tr ":" "\n" | grep -qx "$1" ; then
export PATH="$1:$PATH"
fi
}
### Added by the Heroku Toolbelt
_extend_path "/usr/local/heroku/bin"
_extend_path "$HOME/git/chef-repo/bin" # Scripts stic para chef
### User bins
_extend_path "$HOME/bin"
_extend_path "$HOME/.local/bin" # Local bins
### Go Lang
export GOPATH="$HOME/gocode"
_extend_path "$GOPATH/bin" # Go scripts
alias k="kitchen"
alias k8s="kubectl"
### Pyenv (Python version manager)
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && _extend_path "$PYENV_ROOT/bin"
eval "$(pyenv init - bash)"
eval "$(pyenv virtualenv-init -)"
### Node Version Manager (NVM)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Kubernetes (Kubectl/helm) autocompletado
source <(kubectl completion zsh)
source <(helm completion zsh)
# kube-ps1 (prompt con config)
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/kube-ps1
# PROMPT='$(kube_ps1) '$PROMPT