Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lindwurm
Forked from mollifier/zshrc_useful.sh
Last active January 9, 2016 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindwurm/1a168fbd4f59d6944651 to your computer and use it in GitHub Desktop.
Save lindwurm/1a168fbd4f59d6944651 to your computer and use it in GitHub Desktop.
# 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