term/eshell: add emacs/e command
This commit is contained in:
parent
9b95a18eb8
commit
a1f51ef6e1
1 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,17 @@
|
||||||
;;; term/eshell/autoload/commands.el -*- lexical-binding: t; -*-
|
;;; term/eshell/autoload/commands.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun eshell/emacs (&rest files)
|
||||||
|
"Open a FILES in Emacs.
|
||||||
|
For folks with a habit of using \"emacs\" to open files, even in eshell."
|
||||||
|
(if args
|
||||||
|
(mapc #'find-file
|
||||||
|
(mapcar #'expand-file-name
|
||||||
|
(eshell-flatten-list (reverse args))))
|
||||||
|
(bury-buffer)))
|
||||||
|
;;;###autoload
|
||||||
|
(defalias 'eshell/e #'eshell/emacs)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun eshell/cd-to-project ()
|
(defun eshell/cd-to-project ()
|
||||||
"Change to the project root of the current directory."
|
"Change to the project root of the current directory."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue