summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-unix.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-01-28 21:58:46 +0800
committerChong Yidong <cyd@gnu.org>2012-01-28 21:58:46 +0800
commit93376c5baf50aab8e5095c083ad11dcf9caff36a (patch)
tree5c0bce5e5ae9ddeece76c77c99af0f5d67e544ff /lisp/eshell/em-unix.el
parent8c6e1920922a40d25b440478af6ea5c52ebfdf06 (diff)
downloademacs-93376c5baf50aab8e5095c083ad11dcf9caff36a.tar.gz
Quote file name commands in eshell.
* lisp/eshell/esh-arg.el (eshell-quote-argument): New function. * lisp/eshell/esh-ext.el (eshell-invoke-batch-file): * lisp/eshell/em-unix.el (eshell/cat, eshell/du): Use it to quote the first arg to eshell-parse-command. Fixes: debbugs:10523
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r--lisp/eshell/em-unix.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 296e2ee8b24..6ac53e30e86 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -599,7 +599,7 @@ symlink, then revert to the system's definition of cat."
(let ((ext-cat (eshell-search-path "cat")))
(if ext-cat
(throw 'eshell-replace-command
- (eshell-parse-command ext-cat args))
+ (eshell-parse-command (eshell-quote-argument ext-cat) args))
(if eshell-in-pipeline-p
(error "Eshell's `cat' does not work in pipelines")
(error "Eshell's `cat' cannot display one of the files given"))))
@@ -855,7 +855,7 @@ external command."
(file-remote-p (expand-file-name arg) 'method) "ftp")
(throw 'have-ange-path t))))))
(throw 'eshell-replace-command
- (eshell-parse-command ext-du args))
+ (eshell-parse-command (eshell-quote-argument ext-du) args))
(eshell-eval-using-options
"du" args
'((?a "all" nil show-all