Created
September 7, 2021 05:44
-
-
Save oantolin/0fdfcdf00a10b1746a7dcc233d0d8b19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- 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