about summary refs log tree commit diff stats
path: root/lisp/+eshell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/+eshell.el')
-rw-r--r--lisp/+eshell.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/+eshell.el b/lisp/+eshell.el index bcab846..b874141 100644 --- a/lisp/+eshell.el +++ b/lisp/+eshell.el
@@ -25,6 +25,22 @@ any directory proferred by `consult-dir'."
25 25
26;;; Start and quit 26;;; Start and quit
27 27
28;; from https://old.reddit.com/r/emacs/comments/1zkj2d/advanced_usage_of_eshell/
29(defun +eshell-here ()
30 "Go to eshell and set current directory to current buffer's."
31 ;; consider: make a new eshell buffer when given a prefix argument.
32 (interactive)
33 (let ((dir (file-name-directory (or (buffer-file-name)
34 default-directory))))
35 (eshell)
36 (eshell/pushd ".")
37 (cd dir)
38 (goto-char (point-max))
39 (eshell-kill-input)
40 (eshell-send-input)
41 (setq-local scroll-margin 0)
42 (recenter 0)))
43
28(defun +eshell-quit-or-delete-char (arg) 44(defun +eshell-quit-or-delete-char (arg)
29 "Delete the character to the right, or quit eshell on an empty line." 45 "Delete the character to the right, or quit eshell on an empty line."
30 (interactive "p") 46 (interactive "p")