From: Jari Aalto Date: Mon, 27 Jun 2011 21:47:39 +0000 (-0400) Subject: * eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440). X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~355 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a08cc025e53299a2c72c1b4d5438fff753e72167;p=emacs.git * eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440). (eshell-ls-date-format): New defcustom. (eshell-ls-file): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c13fe48a730..e100573a225 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-06-27 Jari Aalto + + * eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440). + (eshell-ls-date-format): New defcustom. + (eshell-ls-file): Use it. + 2011-06-27 Stefan Monnier * help-fns.el (describe-variable): Fix message for terminal-local vars. diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 4ef259dee4b..17dbe3fbaf2 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -57,6 +57,13 @@ properties to colorize its output based on the setting of :type 'hook :group 'eshell-ls) +(defcustom eshell-ls-date-format "%Y-%m-%d" + "How to display time information in `eshell-ls-file'. +This is passed to `format-time-string' as a format string. +To display the date using the current locale, use \"%b \%e\"." + :type 'string + :group 'eshell-ls) + (defcustom eshell-ls-initial-args nil "If non-nil, this list of args is included before any call to `ls'. This is useful for enabling human-readable format (-h), for example." @@ -508,7 +515,7 @@ whose cdr is the list of file attributes." str)) " " (format-time-string (concat - "%b %e " + eshell-ls-date-format " " (if (= (nth 5 (decode-time (current-time))) (nth 5 (decode-time (nth (cond