diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2018-10-11 17:23:30 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2018-10-11 17:23:30 +0900 |
commit | a7ebc6bf633bd3849ccab032dad6b1fd31b1ef43 (patch) | |
tree | d7f1b0937f6eadb99fc3374600e3802ecda11463 | |
parent | 0d2bf76d3d8a9d05e3b9ff4228608aa446352e7e (diff) | |
download | emacs-a7ebc6bf633bd3849ccab032dad6b1fd31b1ef43.tar.gz |
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).
-rw-r--r-- | lisp/dired-aux.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 516cd2c5672..e40627309d7 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -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 "" |