Mercurial > emacs
changeset 102675:c919d46e66e4
(eshell-ls-file): Enlarge default size-width to 8.
(eshell-ls-dir): Under -l, call eshell-ls-printable-size with last
argument nil.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 21 Mar 2009 13:01:20 +0000 |
parents | bd7232c31c50 |
children | 100b06d58ef9 |
files | lisp/eshell/em-ls.el |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/eshell/em-ls.el Sat Mar 21 13:01:19 2009 +0000 +++ b/lisp/eshell/em-ls.el Sat Mar 21 13:01:20 2009 +0000 @@ -506,8 +506,9 @@ "")) (let* ((str (eshell-ls-printable-size (nth 7 attrs))) (len (length str))) - (if (< len (or size-width 4)) - (concat (make-string (- (or size-width 4) len) ? ) str) + ;; Let file sizes shorter than 9 align neatly. + (if (< len (or size-width 8)) + (concat (make-string (- (or size-width 8) len) ? ) str) str)) " " (format-time-string (concat @@ -565,7 +566,11 @@ size-width (max size-width (length (eshell-ls-printable-size - (nth 7 (cdr e)) t)))))) + (nth 7 (cdr e)) + (not + ;; If we are under -l, count length + ;; of sizes in bytes, not in blocks. + (eq listing-style 'long-listing)))))))) (funcall insert-func "total " (eshell-ls-printable-size total t) "\n"))) (let ((default-directory (expand-file-name dir)))