Mercurial > emacs
diff lisp/eshell/em-ls.el @ 80723:4bb9c71efe05
(eshell-ls-files): List one per line in a pipeline. (Bug#699)
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 15 Aug 2008 06:52:23 +0000 |
parents | 48c4bb2b7d11 |
children |
line wrap: on
line diff
--- 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)))