# HG changeset patch # User Eli Zaretskii # Date 1237640480 0 # Node ID c919d46e66e4da96a36cfc477c35ed4b26852efc # Parent bd7232c31c50356d1679a23f0b712a33e85a41e9 (eshell-ls-file): Enlarge default size-width to 8. (eshell-ls-dir): Under -l, call eshell-ls-printable-size with last argument nil. diff -r bd7232c31c50 -r c919d46e66e4 lisp/eshell/em-ls.el --- 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)))