mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 04:11:18 +00:00
Fire off commands to tmux from dired
This commit is contained in:
parent
8a766c3c86
commit
29c1ea87f0
1 changed files with 15 additions and 0 deletions
|
|
@ -69,5 +69,20 @@
|
|||
(defun ts/send-command-with-notify (command)
|
||||
)
|
||||
|
||||
(require 'dired)
|
||||
|
||||
(defun dired-tmux (command &optional arg file-list)
|
||||
(interactive
|
||||
(let ((files (dired-get-marked-files t current-prefix-arg nil nil t)))
|
||||
(list
|
||||
;; Want to give feedback whether this file or marked files are used:
|
||||
(dired-read-shell-command "& on %s: " current-prefix-arg files)
|
||||
current-prefix-arg
|
||||
files)))
|
||||
(let ((full-command (dired-shell-stuff-it command file-list t arg)))
|
||||
(ts/send-transient-command command full-command)))
|
||||
|
||||
(define-key dired-mode-map (kbd "G") #'dired-tmux)
|
||||
|
||||
(provide 'tmux-send)
|
||||
;;; tmux-send.el ends here
|
||||
|
|
|
|||
Loading…
Reference in a new issue