diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-03-21 13:01:20 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-03-21 13:01:20 +0000 |
commit | 7ed88398085aa8836390cefc22c47c6f10c85ddd (patch) | |
tree | 36e07a43177969269213f36cd253e71b0ec4e36b /lisp/eshell | |
parent | a065aa4a890385b0aef61fe2c9f95ddd6ba1dd27 (diff) | |
download | emacs-7ed88398085aa8836390cefc22c47c6f10c85ddd.tar.gz |
(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/eshell')
-rw-r--r-- | lisp/eshell/em-ls.el | 11 |
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." "")) (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 @@ relative to that directory." 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))) |