aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired-aux.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 6c625ea5620..303eed96aed 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -319,7 +319,7 @@ with a prefix argument."
319;; The in-background argument is only needed in Emacs 18 where 319;; The in-background argument is only needed in Emacs 18 where
320;; shell-command doesn't understand an appended ampersand `&'. 320;; shell-command doesn't understand an appended ampersand `&'.
321;;;###autoload 321;;;###autoload
322(defun dired-do-shell-command (command &optional arg) 322(defun dired-do-shell-command (command &optional arg file-list)
323 "Run a shell command COMMAND on the marked files. 323 "Run a shell command COMMAND on the marked files.
324If no files are marked or a specific numeric prefix arg is given, 324If no files are marked or a specific numeric prefix arg is given,
325the next ARG files are used. Just \\[universal-argument] means the current file. 325the next ARG files are used. Just \\[universal-argument] means the current file.
@@ -339,16 +339,17 @@ The shell command has the top level directory as working directory, so
339output files usually are created there instead of in a subdir." 339output files usually are created there instead of in a subdir."
340;;Functions dired-run-shell-command and dired-shell-stuff-it do the 340;;Functions dired-run-shell-command and dired-shell-stuff-it do the
341;;actual work and can be redefined for customization. 341;;actual work and can be redefined for customization.
342 (interactive (list 342 (interactive
343 ;; Want to give feedback whether this file or marked files are used: 343 (let ((files (dired-get-marked-files t current-prefix-arg)))
344 (dired-read-shell-command (concat "! on " 344 (list
345 "%s: ") 345 ;; Want to give feedback whether this file or marked files are used:
346 current-prefix-arg 346 (dired-read-shell-command (concat "! on "
347 (dired-get-marked-files 347 "%s: ")
348 t current-prefix-arg)) 348 current-prefix-arg
349 current-prefix-arg)) 349 files)
350 (let* ((on-each (not (string-match "\\*" command))) 350 current-prefix-arg
351 (file-list (dired-get-marked-files t arg))) 351 files)))
352 (let* ((on-each (not (string-match "\\*" command))))
352 (if on-each 353 (if on-each
353 (dired-bunch-files 354 (dired-bunch-files
354 (- 10000 (length command)) 355 (- 10000 (length command))