diff options
| author | Jari Aalto | 2011-06-27 17:47:39 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-06-27 17:47:39 -0400 |
| commit | a08cc025e53299a2c72c1b4d5438fff753e72167 (patch) | |
| tree | ed0bc3f5af9940f98a08f4956a9a4d6d651776a7 | |
| parent | e2b551c50e6444892055652b0ba6f3f4f96917f7 (diff) | |
| download | emacs-a08cc025e53299a2c72c1b4d5438fff753e72167.tar.gz emacs-a08cc025e53299a2c72c1b4d5438fff753e72167.zip | |
* eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440).
(eshell-ls-date-format): New defcustom.
(eshell-ls-file): Use it.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/eshell/em-ls.el | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c13fe48a730..e100573a225 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-06-27 Jari Aalto <jari.aalto@cante.net> | ||
| 2 | |||
| 3 | * eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440). | ||
| 4 | (eshell-ls-date-format): New defcustom. | ||
| 5 | (eshell-ls-file): Use it. | ||
| 6 | |||
| 1 | 2011-06-27 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2011-06-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * help-fns.el (describe-variable): Fix message for terminal-local vars. | 9 | * 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 | |||
| 57 | :type 'hook | 57 | :type 'hook |
| 58 | :group 'eshell-ls) | 58 | :group 'eshell-ls) |
| 59 | 59 | ||
| 60 | (defcustom eshell-ls-date-format "%Y-%m-%d" | ||
| 61 | "How to display time information in `eshell-ls-file'. | ||
| 62 | This is passed to `format-time-string' as a format string. | ||
| 63 | To display the date using the current locale, use \"%b \%e\"." | ||
| 64 | :type 'string | ||
| 65 | :group 'eshell-ls) | ||
| 66 | |||
| 60 | (defcustom eshell-ls-initial-args nil | 67 | (defcustom eshell-ls-initial-args nil |
| 61 | "If non-nil, this list of args is included before any call to `ls'. | 68 | "If non-nil, this list of args is included before any call to `ls'. |
| 62 | This is useful for enabling human-readable format (-h), for example." | 69 | This is useful for enabling human-readable format (-h), for example." |
| @@ -508,7 +515,7 @@ whose cdr is the list of file attributes." | |||
| 508 | str)) | 515 | str)) |
| 509 | " " (format-time-string | 516 | " " (format-time-string |
| 510 | (concat | 517 | (concat |
| 511 | "%b %e " | 518 | eshell-ls-date-format " " |
| 512 | (if (= (nth 5 (decode-time (current-time))) | 519 | (if (= (nth 5 (decode-time (current-time))) |
| 513 | (nth 5 (decode-time | 520 | (nth 5 (decode-time |
| 514 | (nth (cond | 521 | (nth (cond |