README: Export to md
README: add missing src block end
README: Change screencast link to srht site
eshell-follow.el
is a global minor mode for Doom Emacs which changes eshell’s working directory to the one in which the file visited by the current buffer is stored (or, in the case of a Dired buffer, the directory it is visiting). I find it handy when working with different windows, as it saves me from cd’ing into a new directory every time I change switch windows.
By default, it applies to eshell’s pop-up window, as displayed after running +eshell/toggle
.
Screencast of eshell-follow in action.
Add this to your packages.el
file:
(package! eshell-follow
:recipe (:type git :repo "https://git.sr.ht/~e-v/eshell-follow.el"))
And something like this to config.el
:
(use-package! eshell-follow
:after-call eshell-follow-global-mode)
Then run doom sync
.
Run eshell-follow-global-mode
to enable it. Run it again to disable it.
Change the value of the eshell-follow-buffer-name
variable according to which eshell buffer should follow your buffers.
For example:
;; Default name of the eshell buffer created by the `eshell' command
(setq eshell-follow-buffer-name "*doom:eshell*")
You can add a keybinding to toggle eshell-follow-global-mode
by adding this to config.el
:
(map! :map eshell-mode-map :localleader :desc "Toggle eshell-follow" "f" #'eshell-follow-global-mode)
This allows you to enable eshell-follow
with SPC m f
when the eshell popup is active.
Please use the bug tracker or send me an email.
eshell-follow-buffer-name
.