Rokiのチラ裏

学生による学習のログ

zsh plugint maneger antigen入れた

色々zshプラグインを管理できるらしい。

% pwd
/Users/rroki
% git clone https://github.com/zsh-users/antigen.git
% mv antigen .antigen
% echo "source ~/.zshrc.antigen" >> .zshrc
% vim .zshrc.antigen
% source .zshrc

以下は.zshrc.antigen。

if [[ -f $HOME/.antigen/antigen/antigen.zsh ]]; then
        source $HOME/.antigen/antigen/antigen.zsh
    antigen bundle zsh-users/zsh-syntax-highlighting
    antigen bundle zsh-users/zsh-completions
    antigen apply
fi

ついでに現段階の.zshrcを何となく公開してみる。

### ALIAS ###
### エイリアスは略

typeset -U path cdpath fpath manpath
typeset -xT SUDO_PATH sudo_path
typeset -U sudo_path
sudo_path=({/usr/local,/usr,}/sbin(N-/))
path=(~/bin(N-/) /usr/local/bin(N-/) ${path})

### 補完など ###
autoload -U compinit; compinit
setopt auto_list
setopt list_types
setopt auto_cd
setopt auto_pushd
setopt pushd_ignore_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt print_eight_bit
setopt no_beep

zstyle ":completion:*" matcher-list "m:{a-z}={A-Z}"
zstyle ":completion:*:default" menu select=1

### string setting ###
export LANG=ja_JP.UTF-8
export LESSCHARSET=utf-8
set fileencodings=cp932,sjis,euc-jp,utf-8
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
export EDITOR=vim
export KCODE=u

### jsc ###
if [[ "$OSTYPE" =~ darwin ]];then
         jscpath="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources"
     if [ -f $jscpath/jsc ];then
         export PATH=$PATH:$jscpath
     fi
 fi

### 通知 ###
function display_notification () {
  osascript -e 'on run argv
      display notification current date as text with title item 1 of argv
        end run' -- "$*"
}

function with_display_notification () {
  "$@"
  display_notification "($?)" "$@"
}


 ### PROMPT ###
 autoload -U colors
 colors
 PROMPT="%m:${fg[green]}%~${reset_color} %B%n%b%f%# "
 RPTOMPT="%*"

 source ~/.zshrc.antigen

そんなこんなで、昨日今日で最高なzshライフをスタートできました。楽し〜。

余談

zshで遊んだ。


また、tmuxを入れた。

brew install tmux

これについては後日記述する。

参考