aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2009-03-21 13:01:20 +0000
committerEli Zaretskii2009-03-21 13:01:20 +0000
commit7ed88398085aa8836390cefc22c47c6f10c85ddd (patch)
tree36e07a43177969269213f36cd253e71b0ec4e36b /lisp
parenta065aa4a890385b0aef61fe2c9f95ddd6ba1dd27 (diff)
downloademacs-7ed88398085aa8836390cefc22c47c6f10c85ddd.tar.gz
emacs-7ed88398085aa8836390cefc22c47c6f10c85ddd.zip
(eshell-ls-file): Enlarge default size-width to 8.
(eshell-ls-dir): Under -l, call eshell-ls-printable-size with last argument nil.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/eshell/em-ls.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 468d190c2bc..ddf33525411 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -506,8 +506,9 @@ whose cdr is the list of file attributes."
506 "")) 506 ""))
507 (let* ((str (eshell-ls-printable-size (nth 7 attrs))) 507 (let* ((str (eshell-ls-printable-size (nth 7 attrs)))
508 (len (length str))) 508 (len (length str)))
509 (if (< len (or size-width 4)) 509 ;; Let file sizes shorter than 9 align neatly.
510 (concat (make-string (- (or size-width 4) len) ? ) str) 510 (if (< len (or size-width 8))
511 (concat (make-string (- (or size-width 8) len) ? ) str)
511 str)) 512 str))
512 " " (format-time-string 513 " " (format-time-string
513 (concat 514 (concat
@@ -565,7 +566,11 @@ relative to that directory."
565 size-width 566 size-width
566 (max size-width 567 (max size-width
567 (length (eshell-ls-printable-size 568 (length (eshell-ls-printable-size
568 (nth 7 (cdr e)) t)))))) 569 (nth 7 (cdr e))
570 (not
571 ;; If we are under -l, count length
572 ;; of sizes in bytes, not in blocks.
573 (eq listing-style 'long-listing))))))))
569 (funcall insert-func "total " 574 (funcall insert-func "total "
570 (eshell-ls-printable-size total t) "\n"))) 575 (eshell-ls-printable-size total t) "\n")))
571 (let ((default-directory (expand-file-name dir))) 576 (let ((default-directory (expand-file-name dir)))