diff options
author | 2020-10-05 23:18:01 -0400 | |
---|---|---|
committer | 2020-10-05 23:18:01 -0400 | |
commit | 927b50b7aec2da105bd5125dec272a89e38663c3 (patch) | |
tree | bc87e015f9de1e58b8f490c755ff272b8968e958 /lisp/bandali-dired.el | |
parent | 514148d8bef4b14c8754197197c32b212dfb79c2 (diff) | |
download | configs-927b50b7aec2da105bd5125dec272a89e38663c3.tar.gz configs-927b50b7aec2da105bd5125dec272a89e38663c3.tar.xz configs-927b50b7aec2da105bd5125dec272a89e38663c3.zip |
Fold lisp/bandali-utils.el back into init.el
Diffstat (limited to '')
-rw-r--r-- | lisp/bandali-dired.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/bandali-dired.el b/lisp/bandali-dired.el index 4755a64..9ed1030 100644 --- a/lisp/bandali-dired.el +++ b/lisp/bandali-dired.el @@ -57,6 +57,15 @@ (set-window-configuration wnd)))) (error "no more than 2 files should be marked")))) + (defun b/dired-start-process (program &optional args) + "Open current file with a PROGRAM." + ;; Shell command looks like this: "program [ARGS]... FILE" (ARGS + ;; can be nil, so remove it). + (declare-function dired-get-file-for-visit "dired") + (apply #'b/start-process + program + (remove nil (list args (dired-get-file-for-visit))))) + ;; local key bindings (define-key dired-mode-map (kbd "b") #'dired-up-directory) (define-key dired-mode-map (kbd "E") #'dired-ediff-files) |