LoginSignup
4
4

More than 5 years have passed since last update.

eshell でも Git リポジトリのトップレベルディレクトリに cd する

Last updated at Posted at 2017-04-20

zsh で Git リポジトリのトップレベル ディレクトリに cd するプラグイン http://qiita.com/mollifier/items/cf0263dccc112ab8b87d
が、ものすごい便利なので eshell でも動くのをこしらました。

~/.emacs.d/init.el
(defun eshell/i ()
  ".gitのあるディレクトリまで上がる"
  (insert (concat "cd " (locate-dominating-file default-directory ".git")))
  (eshell-send-input))

これで i だけで .git のあるところまで cd できます。
eshell/i の i を変更するとコマンド名が変更できます。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4