1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

dired-do-shell-command: Notify users after abort the command

* lisp/dired-aux.el (dired-do-shell-command):  Notify users that
the command have aborted when they answer 'n' to the prompt (Bug#32969).
This commit is contained in:
Tino Calancha 2018-10-11 17:23:30 +09:00
parent 0d2bf76d3d
commit a7ebc6bf63

View File

@ -757,16 +757,17 @@ can be produced by `dired-get-marked-files', for example."
(y-or-n-p (format-message
"Confirm--do you mean to use `?' as a wildcard? ")))
(t))))
(when ok
(if on-each
(dired-bunch-files (- 10000 (length command))
(lambda (&rest files)
(dired-run-shell-command
(dired-shell-stuff-it command files t arg)))
nil file-list)
;; execute the shell command
(dired-run-shell-command
(dired-shell-stuff-it command file-list nil arg)))))))
(cond ((not ok) (message "Command canceled"))
(t
(if on-each
(dired-bunch-files (- 10000 (length command))
(lambda (&rest files)
(dired-run-shell-command
(dired-shell-stuff-it command files t arg)))
nil file-list)
;; execute the shell command
(dired-run-shell-command
(dired-shell-stuff-it command file-list nil arg))))))))
;; Might use {,} for bash or csh:
(defvar dired-mark-prefix ""