[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format
From: |
Jari Aalto |
Subject: |
bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format |
Date: |
Thu, 07 Apr 2011 19:11:31 +0300 |
Package: emacs
Version: 23.2+1-7
Severity: wishlist
The use of locale for displaying dates is problematic outside of English;
An example using FI locale:
eshell$ ls -l
-rw-rw-rw- 1 user users 39269 maalis 7 18:29 align.elc
-rw-rw-rw- 1 user users 297856 helmi 23 11:11 allout.el
-rw-rw-rw- 1 user users 213672 maalis 7 18:29 allout.elc
-rw-rw-rw- 1 user users 25176 tammi 8 11:45 ansi-color.el
The output appears rugged and is hard to read. The following patch make "ls
-l" use international ISO 8601 date format:
-rw-rw-rw- 1 user users 39269 2011-03-07 18:29 align.elc
-rw-rw-rw- 1 user users 297856 2011-02-23 11:11 allout.el
-rw-rw-rw- 1 user users 213672 2011-03-07 18:29 allout.elc
-rw-rw-rw- 1 user users 25176 2011-01-08 11:45 ansi-color.el
2011-04-07 Jari Aalto <jari.aalto@cante.net>
* eshell/em-ls.el
(eshell-ls-date-format): New variable. Show dates in ISO 8601
format by default.
(eshell-ls-file): Use `eshell-ls-date-format'.
-- System Information
Debian Release: wheezy/sid
APT Prefers testing
APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64
GNU/Linux
Locale: LANG=en_US.UTF-8, LC_ALL=
-- Versions of packages `emacs depends on'.
Depends:
emacs23 23.2+1-7 GNU Emacs is the extensible self-documenting
emacs23-lucid 23.2+1-7 GNU Emacs is the extensible self-documenting
emacs23-nox 23.2+1-7 GNU Emacs is the extensible self-documenting
>From 16f782c350b0e97cdf4b58e23797cd0607c82d5b Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Thu, 7 Apr 2011 19:00:46 +0300
Subject: [PATCH] lisp/eshell/em-ls.el: use ISO 8601 in ls -l output
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
lisp/eshell/em-ls.el | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 4ef259d..c7da459 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'.
+For current locale, use \"%b \%e".
+See `format-time-string'."
+ :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
--
1.7.4.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format,
Jari Aalto <=