1152
Comment:
|
← Revision 3 as of 2022-08-05 09:59:24 ⇥
1219
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
* If not prompted to configure zsh on first use, force with {{{ autoload -U zsh-newuser-install |
* Mac: add openssl {{{ export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH" }}} * Linux: If not prompted to configure zsh on first use, force with {{{ |
Line 9: | Line 12: |
* to add k8s auto complete, add to end of ~/.zshrc {{{ | * Mac: to add k8s auto complete, add to end of ~/.zshrc {{{ |
Linux/zsh
Alternate to standard bash shell
Mac: add openssl
export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
Linux: If not prompted to configure zsh on first use, force with
zsh-newuser-install -f
Mac: to add k8s auto complete, add to end of ~/.zshrc
autoload -Uz compinit compinit echo "load kubectl auto completion for zsh $SHELL" [[ $commands[kubectl] ]] && source <(kubectl completion zsh) alias k=kubectl
git prompt
autoload -U colors && colors ## git prompt built into zsh # Load version control information autoload -Uz vcs_info precmd() { vcs_info } # Format the vcs_info_msg_0_ variable # %s=git %r=gitRoot %S=gitPath $b=branch %m=stash %u=unstagedChanges %c=stagedChanges # zstyle ':vcs_info:git:*' formats 'on branch %b' zstyle ':vcs_info:git*' formats "%{$fg[grey]%}%s %{$reset_color%}%r%{$fg[grey]%} %{$fg[blue]%}[%b]%{$reset_color%}%m%u%c%{$reset_color%} " #zstyle ':vcs_info:git*' actionformats "%s %r/%S %b %m%u%c " # Set up the prompt (with git branch name) setopt PROMPT_SUBST #PROMPT='%n in ${PWD/#$HOME/~} ${vcs_info_msg_0_} > ' PROMPT='${vcs_info_msg_0_} ${PWD/#$HOME/~} > '