Created
November 19, 2016 11:31
-
-
Save onokatio/e7b2914f25c9db9e47c880aa2868ce94 to your computer and use it in GitHub Desktop.
.zshrc
This file contains 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
autoload -Uz compinit | |
compinit | |
autoload -Uz colors | |
colors | |
autoload -Uz select-word-style | |
select-word-style default | |
zstyle ':zle:*' word-chars "_-./;@" | |
zstyle ':zle:*' word-style unspecified | |
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_reduce_blanks | |
zstyle ':completion:*:default' menu select=1 | |
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt hist_ignore_all_dups | |
setopt hist_ignore_dups | |
setopt share_history | |
setopt append_history | |
setopt inc_append_history | |
setopt hist_no_store | |
setopt hist_reduce_blanks | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias mkdir='mkdir -p' | |
alias brow='w3m google.com' | |
alias d='popd' | |
alias ls='ls -F --color=auto' | |
alias l='ls -F --color=auto' | |
alias c='git add -A ; git commit -m ' | |
alias p='git push' | |
alias pbcopy='xsel --clipboard --input' | |
alias login='wget -q -O - www.cr.kisarazu.ac.jp/login.gsp --post-data="login=1&user=j16435&pass=NITpasokon96" > /dev/null' | |
alias rm='set -f; rmrm' | |
alias bat="upower -i /org/freedesktop/UPower/devices/battery_BAT0|grep 'percentage'|sed -e 's/ //g'|sed -e 's/percentage://'|sed -e 's/%//'" | |
function rmrm() { | |
local ch | |
echo $@ | grep -Gq "^/$\| /$\|^/ \| / " | |
if [ $? -eq 0 ]; then | |
set +f | |
echo "DONOT execute 'rm /'" | |
return 1 | |
fi | |
echo $@ | grep -q "*" | |
if [ $? -eq 0 ]; then | |
set +f | |
ls $@ | |
if [ $? -ne 0 ]; then | |
return 0 | |
fi | |
echo -n "Are you sure? [Y/n] " | |
while : ; do | |
read ch | |
if [ "${ch}" = "Y" ]; then | |
command rm $@ | |
return 0 | |
elif [ "${ch}" = "n" ] || [ "${ch}" = "N" ]; then | |
return 1 | |
else | |
echo -n "[Y/n]" | |
fi | |
done | |
else | |
command rm $@ | |
return 0 | |
fi | |
} | |
chpwd() { ls -F --color=auto } | |
export WORDCHARS='*?_.[]~-=&;!#$%^(){}<>' | |
UUU="%B%F{white}(」・ω・)」うー%b" | |
NYA="%B%F{white}\(・ω・\)にゃー!%b" | |
SAN="%B%F{red}\(・ω・\)SAN値!%b" | |
PIN="%B%F{red}(/・ω・)/ピンチ!%b" | |
PROMPT="%(?,${UUU},${SAN}) %F{cyan}%~ %f$ " | |
#%(?..) | |
RPROMPT="%(?,${NYA},${PIN})" | |
autoload -Uz vcs_info | |
setopt prompt_subst | |
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_}' | |
if [[ -s ~/.nvm/nvm.sh ]]; | |
then source ~/.nvm/nvm.sh | |
fi | |
function command_not_found_handler(){ | |
echo "ハァ…?何言ってんの?" | |
} | |
[[ -z "$TMUX" && ! -z "$PS1" ]] && tmux && exit | |
echo "\n「私は確かにアニメが好きだし、エロゲーも超好き・・・ううん、愛してると言ってもいい!学校の友達といるのも楽しいよ。でもこっちも同じくらい好き!どっちかを選ぶなんて出来ない!両方好きで好きで堪らないのが私なの!」\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment