diff options
| author | Chong Yidong | 2010-02-07 01:23:10 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-02-07 01:23:10 -0500 |
| commit | a4cc44cf0efd240bdcd2ac9013ea0f20067ccd94 (patch) | |
| tree | 4053b7bfd5b3c5068964e50a9cc3bd3ab2993b4f /lisp/eshell/esh-util.el | |
| parent | c917476d6b5069d8c81675bf7f661ee3ebceb84d (diff) | |
| download | emacs-a4cc44cf0efd240bdcd2ac9013ea0f20067ccd94.tar.gz emacs-a4cc44cf0efd240bdcd2ac9013ea0f20067ccd94.zip | |
Fix to uid/gid format in eshell's ls (Bug#5528).
* eshell/esh-util.el (eshell-file-attributes): New optional arg
ID-FORMAT. Pass it to `file-attributes'.
* eshell/em-ls.el (eshell-do-ls): Use it (Bug#5528).
Diffstat (limited to 'lisp/eshell/esh-util.el')
| -rw-r--r-- | lisp/eshell/esh-util.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 7c21e2e3302..1a4c5e1021b 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -701,8 +701,11 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 701 | (forward-line))) | 701 | (forward-line))) |
| 702 | entry)) | 702 | entry)) |
| 703 | 703 | ||
| 704 | (defun eshell-file-attributes (file) | 704 | (defun eshell-file-attributes (file &optional id-format) |
| 705 | "Return the attributes of FILE, playing tricks if it's over ange-ftp." | 705 | "Return the attributes of FILE, playing tricks if it's over ange-ftp. |
| 706 | The optional argument ID-FORMAT specifies the preferred uid and | ||
| 707 | gid format. Valid values are 'string and 'integer, defaulting to | ||
| 708 | 'integer. See `file-attributes'." | ||
| 706 | (let* ((file (expand-file-name file)) | 709 | (let* ((file (expand-file-name file)) |
| 707 | entry) | 710 | entry) |
| 708 | (if (string-equal (file-remote-p file 'method) "ftp") | 711 | (if (string-equal (file-remote-p file 'method) "ftp") |
| @@ -723,7 +726,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 723 | (setq entry (cdr fentry)) | 726 | (setq entry (cdr fentry)) |
| 724 | (setq entry nil))))) | 727 | (setq entry nil))))) |
| 725 | entry) | 728 | entry) |
| 726 | (file-attributes file)))) | 729 | (file-attributes file id-format)))) |
| 727 | 730 | ||
| 728 | (defalias 'eshell-copy-tree 'copy-tree) | 731 | (defalias 'eshell-copy-tree 'copy-tree) |
| 729 | 732 | ||