Advertisement
Guest User

Untitled

a guest
Nov 19th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. autoload -Uz compinit
  2. compinit
  3.  
  4. autoload -Uz colors
  5. colors
  6.  
  7. autoload -Uz select-word-style
  8. select-word-style default
  9. zstyle ':zle:*' word-chars "_-./;@"
  10. zstyle ':zle:*' word-style unspecified
  11.  
  12. setopt share_history
  13. setopt histignorealldups
  14. setopt auto_cd
  15. setopt extended_glob
  16. setopt hist_ignore_all_dups
  17. setopt list_packed
  18. setopt list_types
  19. setopt auto_param_slash
  20. setopt mark_dirs
  21. setopt auto_param_keys
  22. setopt magic_equal_subst
  23. setopt complete_in_word
  24. setopt always_last_prompt
  25. setopt print_eight_bit
  26. setopt no_beep
  27. setopt ignore_eof
  28. setopt auto_pushd
  29. setopt hist_reduce_blanks
  30.  
  31. zstyle ':completion:*:default' menu select=1
  32.  
  33. HISTFILE=~/.zsh_history
  34. HISTSIZE=10000
  35. SAVEHIST=10000
  36. setopt hist_ignore_all_dups
  37. setopt hist_ignore_dups
  38. setopt share_history
  39. setopt append_history
  40. setopt inc_append_history
  41. setopt hist_no_store
  42. setopt hist_reduce_blanks
  43.  
  44. alias ...='cd ../..'
  45. alias ....='cd ../../..'
  46. alias mkdir='mkdir -p'
  47. alias brow='w3m google.com'
  48. alias d='popd'
  49. alias ls='ls -F --color=auto'
  50. alias l='ls -F --color=auto'
  51. alias c='git add -A ; git commit -m '
  52. alias p='git push'
  53. alias pbcopy='xsel --clipboard --input'
  54. alias login='wget -q -O - www.cr.kisarazu.ac.jp/login.gsp --post-data="login=1&user=j16435&pass=NITpasokon96" > /dev/null'
  55. alias rm='set -f; rmrm'
  56. alias bat="upower -i /org/freedesktop/UPower/devices/battery_BAT0|grep 'percentage'|sed -e 's/ //g'|sed -e 's/percentage://'|sed -e 's/%//'"
  57.  
  58. function rmrm() {
  59. local ch
  60. echo $@ | grep -Gq "^/$\| /$\|^/ \| / "
  61. if [ $? -eq 0 ]; then
  62. set +f
  63. echo "DONOT execute 'rm /'"
  64. return 1
  65. fi
  66.  
  67. echo $@ | grep -q "*"
  68. if [ $? -eq 0 ]; then
  69. set +f
  70. ls $@
  71. if [ $? -ne 0 ]; then
  72. return 0
  73. fi
  74. echo -n "Are you sure? [Y/n] "
  75. while : ; do
  76. read ch
  77. if [ "${ch}" = "Y" ]; then
  78. command rm $@
  79. return 0
  80. elif [ "${ch}" = "n" ] || [ "${ch}" = "N" ]; then
  81. return 1
  82. else
  83. echo -n "[Y/n]"
  84. fi
  85. done
  86. else
  87. command rm $@
  88. return 0
  89. fi
  90. }
  91.  
  92. chpwd() { ls -F --color=auto }
  93.  
  94. export WORDCHARS='*?_.[]~-=&;!#$%^(){}<>'
  95.  
  96. UUU="%B%F{white}(」・ω・)」うー%b"
  97. NYA="%B%F{white}\(・ω・\)にゃー!%b"
  98. SAN="%B%F{red}\(・ω・\)SAN値!%b"
  99. PIN="%B%F{red}(/・ω・)/ピンチ!%b"
  100.  
  101. PROMPT="%(?,${UUU},${SAN}) %F{cyan}%~ %f$ "
  102.  
  103. #%(?..)
  104.  
  105. RPROMPT="%(?,${NYA},${PIN})"
  106.  
  107. autoload -Uz vcs_info
  108. setopt prompt_subst
  109. zstyle ':vcs_info:git:*' check-for-changes true
  110. zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
  111. zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
  112. zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
  113. zstyle ':vcs_info:*' actionformats '[%b|%a]'
  114. precmd () { vcs_info }
  115. RPROMPT=$RPROMPT'${vcs_info_msg_0_}'
  116.  
  117. if [[ -s ~/.nvm/nvm.sh ]];
  118. then source ~/.nvm/nvm.sh
  119. fi
  120.  
  121. function command_not_found_handler(){
  122. echo "ハァ…?何言ってんの?"
  123. }
  124.  
  125. [[ -z "$TMUX" && ! -z "$PS1" ]] && tmux && exit
  126.  
  127. echo "\n「私は確かにアニメが好きだし、エロゲーも超好き・・・ううん、愛してると言ってもいい!学校の友達といるのも楽しいよ。でもこっちも同じくらい好き!どっちかを選ぶなんて出来ない!両方好きで好きで堪らないのが私なの!」\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement