From: Glenn Morris Date: Fri, 15 Aug 2008 06:52:34 +0000 (+0000) Subject: (eshell-ls-files): List one per line in a pipeline. (Bug#699) X-Git-Tag: emacs-pretest-22.2.90~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4aa8cbfb163090bc678a30ae6458eafacd7e59e6;p=emacs.git (eshell-ls-files): List one per line in a pipeline. (Bug#699) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa439380097..96ec3e8c1d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-08-15 Glenn Morris + + * eshell/em-ls.el (eshell-ls-files): List one per line in a pipeline. + (Bug#699) + 2008-08-13 Martin Rudalics * emacs-lisp/find-func.el (find-library): Wrap search for diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index a31fb26b5f1..bdfe66420fb 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -638,7 +638,12 @@ In Eshell's implementation of ls, ENTRIES is always reversed." "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)))