summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2011-06-27 17:47:39 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-06-27 17:47:39 -0400
commita08cc025e53299a2c72c1b4d5438fff753e72167 (patch)
treeed0bc3f5af9940f98a08f4956a9a4d6d651776a7 /lisp/eshell
parente2b551c50e6444892055652b0ba6f3f4f96917f7 (diff)
downloademacs-a08cc025e53299a2c72c1b4d5438fff753e72167.tar.gz
* eshell/em-ls.el: Display `ls -l' dates in ISO format (Bug#8440).
(eshell-ls-date-format): New defcustom. (eshell-ls-file): Use it.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-ls.el9
1 files changed, 8 insertions, 1 deletions
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