Last active
February 29, 2020 02:16
-
-
Save naotookuda/b87d664d307aa1761554fcf303729a81 to your computer and use it in GitHub Desktop.
zsh configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# evironment variables | |
export LANG=ja_JP.UTF-8 | |
# history settings | |
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
# remove depulicate history | |
setopt hist_ignore_dups | |
setopt hist_ignore_all_dups | |
# share history with other zsh process | |
setopt share_history | |
# completion | |
autoload -Uz compinit | |
compinit -u | |
if [ -e /usr/local/share/zsh-completions ]; then | |
fpath=(/usr/local/share/zsh-completions $fpath) | |
fi | |
# ignore case in completion | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
setopt list_packed | |
zstyle ':completion:*' list-colors '' | |
# correct command spell | |
setopt correct | |
setopt no_beep | |
# prompt | |
autoload -Uz vcs_info | |
setopt prompt_subst | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:git:*' stagedstr "%F{magenta}!" | |
zstyle ':vcs_info:git:*' unstagedstr "%F{yellow}+" | |
zstyle ':vcs_info:*' formats "%F{cyan}%c%u[%b]%f" | |
zstyle ':vcs_info:*' actionformats '[%b|%a]' | |
precmd() { vcs_info } | |
#PROMPT='%m:%F{green}%~%f %n %F{yellow}$%f ' | |
PROMPT='%F{green}%n@%m%f:%F{cyan}%~%f ${vcs_info_msg_0_} | |
$ ' | |
#RPROMPT='${vcs_info_msg_0_}' | |
# color in terminal | |
export CLICOLOR=1 | |
export LSCOLORS=exfxcxdxbxegedabagacad | |
alias ls='ls -G' | |
# zmv | |
autoload -U zmv | |
# Make | |
alias m='make' | |
# Git | |
alias gl='git log --graph --pretty=oneline' | |
# Python | |
export PYENV_PATH="$HOME/.pyenv" | |
export PYENV_ROOT="$HOME/.pyenv" | |
eval "$(pyenv init -)" | |
# Ruby | |
eval "$(rbenv init -)" | |
# Node.js | |
export PATH=$HOME/.nodebrew/current/bin:$PATH | |
# Go languages | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
# Rust Languages | |
export CARGO_HOME=$HOME/.cargo | |
export PATH=$CARGO_HOME/bin:$PATH | |
# Google Cloud SDK | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '$HOME/google-cloud-sdk/path.zsh.inc' ]; then source '$HOME/google-cloud-sdk/path.zsh.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '$HOME/google-cloud-sdk/completion.zsh.inc' ]; then source '$HOME/google-cloud-sdk/completion.zsh.inc'; fi | |
# kubernetes | |
source <(kubectl completion zsh) | |
# source <(helm completion zsh) | |
export PATH="$HOME/.jenv/bin:$PATH" | |
eval "$(jenv init -)" | |
alias jenv13='jenv global system && exec $SHELL -l' | |
alias jenv11='jenv global 11.0 && exec $SHELL -l' | |
alias jenv8='jenv global 1.8 && exec $SHELL -l' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment