oh-my-zshで最強のシェルzshをスタートダッシュする! | Act as Professional - hiroki.jp
上のサイトを中心に、oh-my-zshを入れてみました。
僕の理解だと、oh-my-zshは、肥大化したzsh設定ファイルを分割する
と思っています。別に、普通のzshと機能面では何等変わりないとも漢字マスター。
また、上のサイトを参考に、emacsプラグインを作成してみました。
~/.oh-my-zsh/plugins/emacs/emacs.plugin.zsh
といっても、下2つのサイトのコードを利用しただけなんですけども。
Small aliases to get along with Emacs buffer.
ターミナルの zsh と Emacs を風のように駆け抜ける! / マスタカの ChangeLog メモ
## Invoke the ``dired'' of current working directory in Emacs buffer. function dired () { emacsclient -e "(dired \"${1:a}\")" } ## Chdir to the ``default-directory'' of currently opened in Emacs buffer. function cde () { EMACS_CWD=`emacsclient -e " (expand-file-name (with-current-buffer (if (featurep 'elscreen) (let* ((frame-confs (elscreen-get-frame-confs (selected-frame))) (num (nth 1 (assoc 'screen-history frame-confs))) (cur-window-conf (cadr (assoc num (assoc 'screen-property frame-confs)))) (marker (nth 2 cur-window-conf))) (marker-buffer marker)) (nth 1 (assoc 'buffer-list (nth 1 (nth 1 (current-frame-configuration)))))) default-directory))" | sed 's/^"\(.*\)"$/\1/'` echo "chdir to $EMACS_CWD" cd "$EMACS_CWD" }
あとはターミナルを再起動するなり source .zshrcするなりするだけ。
追記: URL間違えたので修正しました。