diff options
author | Gerd Moellmann <gerd@gnu.org> | 1999-12-06 16:44:28 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 1999-12-06 16:44:28 +0000 |
commit | d984dbc116c66860123a7d431213a80998d3ca6e (patch) | |
tree | 3ef66738c5ddb91187348c3528342e02bf9773c0 /lisp/dired-aux.el | |
parent | 32fd7972629ec6752b4ac0f465915cc60d85e8ae (diff) | |
download | emacs-d984dbc116c66860123a7d431213a80998d3ca6e.tar.gz |
(dired-do-shell-command): Changed documentation.
(dired-shell-stuff-it): A `?' in COMMAND has now the same
meaning as `*'.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e9fe84a9ec3..b4ea496eceb 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -319,6 +319,10 @@ Normally the command is run on each file individually. However, if there is a `*' in the command then it is run just once with the entire file list substituted there. +If there is no `*', but a `?' in the command then it is still run +on each file individually but with the filename substituted there +instead of att the end of the command. + No automatic redisplay of dired buffers is attempted, as there's no telling what files the command may have changed. Type \\[dired-do-redisplay] to redisplay the marked files. @@ -370,13 +374,17 @@ the list of file names explicitly with the FILE-LIST argument." ;; (coming from interactive P and currently ignored) to decide what to do. ;; Smart would be a way to access basename or extension of file names. ;; See dired-trns.el for an approach to this. - ;; Bug: There is no way to quote a * - ;; On the other hand, you can never accidentally get a * into your cmd. + ;; Bug: There is no way to quote a * or a ? + ;; On the other hand, you can never accidentally get a * or a ? into + ;; your cmd. (let ((stuff-it - (if (string-match "\\*" command) - (function (lambda (x) - (dired-replace-in-string "\\*" x command))) - (function (lambda (x) (concat command " " x)))))) + (cond ((string-match "\\*" command) + (function (lambda (x) + (dired-replace-in-string "\\*" x command)))) + ((string-match "\\?" command) + (function (lambda (x) + (dired-replace-in-string "\\?" x command)))) + (t (function (lambda (x) (concat command " " x))))))) (if on-each (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) ";") (let ((fns (mapconcat 'shell-quote-argument |