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 (y-or-n-p (format-message
"Confirm--do you mean to use `?' as a wildcard? "))) "Confirm--do you mean to use `?' as a wildcard? ")))
(t)))) (t))))
(when ok (cond ((not ok) (message "Command canceled"))
(if on-each (t
(dired-bunch-files (- 10000 (length command)) (if on-each
(lambda (&rest files) (dired-bunch-files (- 10000 (length command))
(dired-run-shell-command (lambda (&rest files)
(dired-shell-stuff-it command files t arg))) (dired-run-shell-command
nil file-list) (dired-shell-stuff-it command files t arg)))
;; execute the shell command nil file-list)
(dired-run-shell-command ;; execute the shell command
(dired-shell-stuff-it command file-list nil arg))))))) (dired-run-shell-command
(dired-shell-stuff-it command file-list nil arg))))))))
;; Might use {,} for bash or csh: ;; Might use {,} for bash or csh:
(defvar dired-mark-prefix "" (defvar dired-mark-prefix ""