Skip to content

Instantly share code, notes, and snippets.

@arusu0629 arusu0629/.zshrc
Last active Jan 8, 2018

What would you like to do?
# Language
export LANG=ja_JP.UTF-8
# add PATH
if [ -d ${HOME}/.rbenv ] ; then
export PATH
eval "$(rbenv init -)"
# help how to use each commands
autoload -U compinit # supplement
compinit -u # well supplement
setopt autopushd # well "cd -"
setopt auto_list
setopt auto_menu
setopt list_packed
setopt auto_cd # auto change directory
# suppliment list size is 300
# set emacs keybind
bindkey -e
# C-p , C-n -> predict change of commands
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^p" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
# prompt
autoload colors
PROMPT="%{${fg[cyan]}%}[%n@"arusu"] %(!.#.$) %{${reset_color}%}"
PROMPT2="%{${fg[cyan]}%}%_> %{${reset_color}%}"
SPROMPT="%{${fg[yellow]}%}correct: %R -> %r [nyae]? %{${reset_color}%}"
export LSCOLORS=Exfxcxdxbxegedabagacad
export LS_COLORS='di=01;34:ln=01;35:so=01;32:ex=01;31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
# alias
alias ls="ls -G"
alias la="ls -a -G"
alias lf="ls -F -G"
alias ll="ls -l -G"
alias du="du -h"
alias df="df -h"
alias su="su -l"
alias say="say -v Alex"
# git branch prompt
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats '[%b]'
zstyle ':vcs_info:*' actionformats '[%b|%a]'
zstyle ":vcs_info:git:*" unstaedstr "<U>"
zstyle ":vcs_info:git:*" stagedstr "<S>"
precmd () {
LANG=en_US.UTF-8 vcs_info
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
RPROMPT="%1(v|%F{yellow}%1v%f|) %F{green}[%~]%f"
# history
export HISTFILE=${HOME}/.zsh_history # refer to save place
export HISTSIZE=10000
export SAVEHIST=100000
setopt hist_ignore_dups # not repetition
setopt EXTENDED_HISTORY # save beginning and end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.