Skip to content

Instantly share code, notes, and snippets.

@onokatio
Created December 5, 2016 23:52
Show Gist options
  • Save onokatio/cd043d3863d1f70ca2b7ca93b7e91323 to your computer and use it in GitHub Desktop.
Save onokatio/cd043d3863d1f70ca2b7ca93b7e91323 to your computer and use it in GitHub Desktop.
zshrc
[[ -z "$TMUX" && ! -z "$PS1" ]] && tmux && exit
fpath=(~/.zsh_plugins/zsh-completions/src $fpath)
autoload -U compinit && compinit
autoload -U colors && colors
# autoload -U add-zsh-hook
autoload -U select-word-style && select-word-style default
# autoload predict-on && predict-on
zstyle ':zle:*' word-chars "*?_.~-=&!#$%^(){}<>./;@ "
zstyle ':zle:*' word-style unspecified
zstyle ':completion:*' format '%B%F{blue}%d%f%b'
zstyle ':completion:*' group-name ''
zstyle ':completion:*:default' menu select=2
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z} r:|[._-]=*'
zstyle ':completion:*' keep-prefix
zstyle ':completion:*' recent-dirs-insert both
zstyle ':completion:*' completer _expand _oldlist _complete _list _match _history _ignored _approximate _prefix
zstyle ':completion:*' use-cache yes
zstyle ':completion:*' cache-path ~/.zsh/cache
zstyle ':completion:*' verbose yes
zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin
zstyle ':completion:*' use-cache true
zstyle ':completion:*' list-separator '-->'
export LSCOLORS=Dxfxcxdxbxegedabagacad
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'
export ZLS_COLORS=$LS_COLORS
REPORTTIME=3
setopt notify
setopt correct
setopt auto_list
setopt auto_menu
setopt share_history
setopt histignorealldups
setopt auto_cd
setopt extended_glob
setopt hist_ignore_all_dups
setopt list_packed
setopt list_types
setopt auto_param_slash
setopt mark_dirs
setopt auto_param_keys
setopt magic_equal_subst
setopt complete_in_word
setopt always_last_prompt
setopt print_eight_bit
setopt no_beep
setopt ignore_eof
setopt auto_pushd
setopt hist_ignore_dups
setopt append_history
setopt inc_append_history
setopt hist_no_store
setopt hist_reduce_blanks
setopt prompt_subst
setopt no_nomatch
setopt transient_rprompt
setopt hist_verify
setopt extended_history
setopt hist_expand
setopt rec_exact
setopt no_flow_control
setopt interactive_comments
setopt globdots
zstyle ':completion:*:default' menu select=1
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
alias mkdir='mkdir -p'
alias b='w3m www.google.co.jp'
alias d='popd'
alias login='wget -q -O - www.cr.kisarazu.ac.jp/login.gsp --post-data="login=1&user=j16435&pass=NITpasokon96" > /dev/null'
alias bat="upower -i /org/freedesktop/UPower/devices/battery_BAT0|grep 'percentage'|sed -e 's/ //g'|sed -e 's/percentage://'|sed -e 's/%//'"
alias gcc-win="/usr/bin/i686-w64-mingw32-gcc"
alias nano="vim"
alias grep="grep --color -n -I"
alias ls='ls -hqp --color=auto'
alias l='ls -hqp --color=auto'
chpwd() { ls -hqp --color=auto }
UUU="%B%F{white}(」・ω・)」うー%b"
NYA="%B%F{white}\(・ω・\)にゃー!%b"
SAN="%B%F{red}\(・ω・\)SAN値!%b"
PIN="%B%F{red}(/・ω・)/ピンチ!%b"
PROMPT="%K{green}%(?,${UUU},${SAN})%k %F{cyan}%~ %f$ "
RPROMPT="%K{green}%(?,${NYA},${PIN})%k"
if [ ${UID} -eq 0 ]; then
PROMPT="%K{green}%B%F{black}ROOT%b%k %F{cyan}%~ %f$ "
RPROMPT=""
fi
autoload -U vcs_info
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
RPROMPT=$RPROMPT'${vcs_info_msg_0_}'
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
function command_not_found_handler(){
echo "ハァ…?$1とか何言ってんの?"
}
echo "\n「私は確かにアニメが好きだし、エロゲーも超好き・・・ううん、愛してると言ってもいい!学校の友達といるのも楽しいよ。でもこっちも同じくらい好き!どっちかを選ぶなんて出来ない!両方好きで好きで堪らないのが私なの!」\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment