]> git.eshelyaron.com Git - emacs.git/commitdiff
(eshell-do-pipelines): Indicate the last command in a pipeline.
authorGlenn Morris <rgm@gnu.org>
Fri, 15 Aug 2008 06:55:11 +0000 (06:55 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 15 Aug 2008 06:55:11 +0000 (06:55 +0000)
lisp/eshell/esh-cmd.el

index 17ae50d1f5036d555f188576897c08310a01d588..82677aec8aabdfae0ed91e12bf270d49db72e363 100644 (file)
@@ -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.