summaryrefslogtreecommitdiff
path: root/lisp/eshell/esh-cmd.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/esh-cmd.el')
-rw-r--r--lisp/eshell/esh-cmd.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 17ae50d1f50..82677aec8aa 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -838,7 +838,11 @@ this grossness will be made to disappear by using `call/cc'..."
(setcar head
(intern-soft
(concat (symbol-name (car head)) "*"))))))
- ,(car pipeline)))))
+ ;; Indicate to the command if it is the last in the pipeline.
+ ;; Currently only used by eshell-ls-files.
+ ;; Perhaps nil, rather than 'last, would be OK?
+ (let ((eshell-in-pipeline-p ,(if (cdr pipeline) t (quote 'last))))
+ ,(car pipeline))))))
(defmacro eshell-do-pipelines-synchronously (pipeline)
"Execute the commands in PIPELINE in sequence synchronously.