>From aefc85c364f6e51676ffc9dc44deb9a4d43a128c Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Wed, 25 Jan 2012 23:38:54 +0100 Subject: [PATCH] Fix dired-do-async-shell-command on multiple files individually (bug#10598) The `dired-shell-stuff-it' should not insert the ";" shell command separator when called with a command argument ending with the "&" character. Signed-off-by: Jeremy Compostella --- lisp/dired-aux.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 2d05be3..74f0de9 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -659,7 +659,8 @@ can be produced by `dired-get-marked-files', for example." retval)) (lambda (x) (concat command dired-mark-separator x))))) (if on-each - (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) ";") + (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) + (if (string-match "[ \t]*&[ \t]*\\'" command) "" ";")) (let ((files (mapconcat 'shell-quote-argument file-list dired-mark-separator))) (if (> (length file-list) 1) -- 1.7.2.5