4DA / eshell-toggle

Show/hide eshell at the bottom of active window with directory of its buffer
39 stars 14 forks source link

Simple functionality to show/hide eshell/ansi-term (or almost any other buffer, see eshell-toggle-init-function description below) at the bottom of active window with directory of its buffer.

Installation

(add-to-list 'load-path "/path/to/eshell-toggle.el")
(require 'eshell-toggle)
(global-set-key (kbd "s-`") 'eshell-toggle)

or using use-package and quelpa:

(use-package eshell-toggle
  :custom
  (eshell-toggle-size-fraction 3)
  (eshell-toggle-find-project-root-package t) ;; for projectile
  ;;(eshell-toggle-find-project-root-package 'projectile) ;; for projectile
  ;; (eshell-toggle-use-projectile-root 'project) ;; for in-built project.el
  (eshell-toggle-run-command nil)
  (eshell-toggle-init-function #'eshell-toggle-init-ansi-term)
  :quelpa
  (eshell-toggle :repo "4DA/eshell-toggle" :fetcher github :version original)
  :bind
  ("s-`" . eshell-toggle))

Customization

If you want to change these on a per-directory basis, you can use .dir-locals.el magic:

((nil . ((eshell-toggle-init-function . eshell-toggle-init-ansi-term))))