Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;; -*- lexical-binding: t; -*-
;; to use run: emacs --batch -l standalone-eshell.el
(require 'em-prompt)
(let ((dir default-directory))
(add-hook 'eshell-directory-change-hook
(lambda () (setq dir default-directory)))
(while t
(let* ((default-directory dir)
(command (read-from-minibuffer (funcall eshell-prompt-function))))
(princ (eshell-command-result command)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment