アーカイブ: 2009年4月14日
ubuntu で使うシェルをzshに変更してみる
でんち です。
コマンド打つときは2~3文字入れてTabキーを押すと補完されるのでとても便利です。
ふと、隣にいることだまん先生が、
標準で使っている /bin/bash よりも zsh の方がTabでの補完が強力だ、
というので、zshに変更してみることにしました。
まずはzshをゲットする
sudo apt-get install zsh
続いてzshに変更
chsh -s /bin/zsh
パスワード訊かれるので入れて終了。
再ログイン後から有効です。
で、さっそく端末を起動すると、こんなのが出ます。
This is the Z Shell configuration function for new users, zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.(1) Continue to the main menu.
--- Type one of the keys in parentheses ---
なんだか全く読まずに、ここで q なりEnterなり押すと普通に使えるわけですが、 1キー を押すとzshのオプション設定が表示されます。
とりあえずコマンドの履歴を保存するように設定しておきましょう。
未設定だと保存してくれませんので、historyが使えないです…
設定については、よく読んでからまた書くかもです。