漢の zsh

zsh との付き合いは 7 年くらいになりますが、やはり補完が便利です。 tar のオプションを補完。 % tar ←ここで tab キー A – append to an archive c – create a new archive f – specify archive file or device...

2009-04-30 (木) · masutaka

設定ファイルの読み込み順番

ログインシェルとして起動: .zshenv -> .zprofile -> .zshrc -> .zlogin インタラクティブシェルとして起動: .zshenv -> .zshrc シェルスクリプトとして起動: .zshenv ログインシェルとして終了: .zlogout

2007-01-22 (月) · masutaka

ログイン/ログアウトの監視

tcshでもできるみたい。 http://tehanu.hpcl.titech.ac.jp/zsh/waka/intro-LoginLogoutWatching.html % watch=all % WATCHFMT="%n has %a %l from %m at %t %w." % log

2004-12-14 (火) · masutaka

cd した履歴を辿ってくれる。

% cd -[TAB]

2004-01-08 (木) · masutaka

foreach 文の使い方

foreach file (*); if [ -d “$file” ]; then; ls -alFd $file; fi; end

2003-06-26 (木) · masutaka

補完テーブルを作り直す

hash -r

2003-02-25 (火) · masutaka

パイプとリダイレクト

|&' は 2>&1 |’ の省略形だが、>& word' は > word 2>&1’ の省略形ではない。

2003-02-19 (水) · masutaka

zsh-tips第?弾

|which コマンド名 と ‘=コマンド名’は同じ |% ls -al =emacs |lrwxrwxrwx 1 root root 5 Apr 30 06:44 /usr/local/bin/emacs -> emcws | |rm *.o~hoge.o で hoge.o 以外の全ての *.o が消せる。 | |ワイルドカー...

2002-07-24 (水) · masutaka

HIST_IGNORE_ALL_DUPS -> 同じコマンドの history は履歴に入れない。

‘setopt histignorealldups’して、‘history’すると同じ履歴は消えているけど、 $HIST...

2002-06-13 (木) · masutaka

zsh for the working researcher

http://cl.aist-nara.ac.jp/student/daiti-m/text/zsh-intro.html

2002-05-23 (木) · masutaka