# HG changeset patch # User Glenn Morris # Date 1218783143 0 # Node ID 4bb9c71efe052af4f218b18ce0c7c1d5c9b00b63 # Parent 57cdd719e459bad42f6b6d745f797a2cd1add41c (eshell-ls-files): List one per line in a pipeline. (Bug#699) diff -r 57cdd719e459 -r 4bb9c71efe05 lisp/eshell/em-ls.el --- a/lisp/eshell/em-ls.el Wed Aug 13 03:07:55 2008 +0000 +++ b/lisp/eshell/em-ls.el Fri Aug 15 06:52:23 2008 +0000 @@ -638,7 +638,12 @@ "Output a list of FILES. Each member of FILES is either a string or a cons cell of the form \(FILE . ATTRS)." - (if (memq listing-style '(long-listing single-column)) + ;; Mimic behavior of coreutils ls, which lists a single file per + ;; line when output is not a tty. Exceptions: if -x was supplied. + ;; Not really the same since not testing output destination. + (if (or (and eshell-in-pipeline-p + (not (eq listing-style 'by-lines))) + (memq listing-style '(long-listing single-column))) (eshell-for file files (if file (eshell-ls-file file size-width copy-fileinfo)))