Skip to content

Commit

Permalink
Add find-files alternative that works with multiple args or globs.
Browse files Browse the repository at this point in the history
  • Loading branch information
thatismatt committed Oct 20, 2022
1 parent 1288c67 commit 23f1a72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eshell/alias
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alias l ls -la $*
alias c clear :scrollback
alias e find-file $1
alias e matt-find-files $*
5 changes: 5 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@
(replace-regexp-in-string "%" "%%" (abbreviate-file-name (buffer-file-name)))
"%b"))))

(defun matt-find-files (filenames)
"Useful as eshell alias, FILENAMES can be multiple args or globs."
(mapc 'find-file
(if (consp (car filenames)) (car filenames) filenames)))

(when (not (boundp 'matt-mode-line-format-default)) ;; make safe for re-evaluation
(setq matt-mode-line-format-default mode-line-format))

Expand Down

0 comments on commit 23f1a72

Please sign in to comment.