-
-
Save lindwurm/1a168fbd4f59d6944651 to your computer and use it in GitHub Desktop.
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
# zshrc | |
# License : MIT | |
# http://mollifier.mit-license.org/ | |
# | |
# special thanks: | |
# [https://gist.github.com/mollifier/4979906/43d1c77344dd59fa119ca5b75e7a54e01e668710] | |
# [https://gist.github.com/lindwurm/12bde09c66987a7341ac/19a139d77e0d07f8421a44cdf7d4553703f0b9d7] | |
# [http://aircastle.hatenablog.com/entry/20080428/1209313162] | |
######################################## | |
# 補完とプロンプト | |
autoload -Uz compinit promptinit | |
setopt HIST_IGNORE_DUPS | |
compinit | |
promptinit | |
# ほんとは色付けたいけど顔文字の括弧のおかげでうまく行かなくて断念中 | |
PROMPT="ξ*σ_σ)ξoO( %~ ) : " | |
# historyの設定 | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
function history-all { history -E 1 } | |
# 色 | |
autoload -Uz colors; colors | |
alias ls='ls --color=auto' | |
# いつもの環境変数 | |
export PATH="${HOME}/bin:${PATH}" | |
# 日本語ファイル名を表示可能にする | |
setopt print_eight_bit | |
# Ctrl+Dでzshを終了しない | |
setopt ignore_eof | |
# '#' 以降をコメントとして扱う | |
setopt interactive_comments | |
# 同時に起動したzshの間でヒストリを共有する | |
setopt share_history | |
# ヒストリに保存するときに余分なスペースを削除する | |
setopt hist_reduce_blanks | |
# Linux用の設定 | |
alias ls='ls -F --color=auto' | |
## ターミナルのウィンドウ名を user@host: /path/to/current/directory の形に変更 | |
precmd() { | |
[[ -t 1 ]] || return | |
case $TERM in | |
*xterm*|rxvt|(dt|k|E)term) | |
print -Pn "\e]2;%n@%m: %~\a" | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment