diff options
author | Aidan Gauland <aidalgol@no8wireless.co.nz> | 2013-02-08 10:07:03 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-02-08 10:07:03 -0500 |
commit | 276a61a690dce8e4d1ecd5da1a964792c6e5754e (patch) | |
tree | f7b48cca1fee880cdc318a99d08dee8624b1cf2e /lisp/eshell/em-ls.el | |
parent | 8ca30920525154d5eef67899b04dde77f4176169 (diff) | |
download | emacs-276a61a690dce8e4d1ecd5da1a964792c6e5754e.tar.gz |
* lisp/eshell: Minor fixes.
* lisp/eshell/em-ls.el (show-almost-all): Declare.
(eshell-do-ls): Add support for -A argument.
* lisp/eshell/esh-proc.el (eshell/kill): Rewrite.
Diffstat (limited to 'lisp/eshell/em-ls.el')
-rw-r--r-- | lisp/eshell/em-ls.el | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index eec932103ee..eb24d8da0b6 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -328,6 +328,7 @@ instead." (defvar numeric-uid-gid) (defvar reverse-list) (defvar show-all) +(defvar show-almost-all) (defvar show-recursive) (defvar show-size) (defvar sort-method) @@ -337,13 +338,15 @@ instead." (defun eshell-do-ls (&rest args) "Implementation of \"ls\" in Lisp, passing ARGS." (funcall flush-func -1) - ;; process the command arguments, and begin listing files + ;; Process the command arguments, and begin listing files. (eshell-eval-using-options "ls" (if eshell-ls-initial-args (list eshell-ls-initial-args args) args) `((?a "all" nil show-all - "show all files in directory") + "do not ignore entries starting with .") + (?A "almost-all" nil show-almost-all + "do not list implied . and ..") (?c nil by-ctime sort-method "sort by last status change time") (?d "directory" nil dir-literal @@ -558,7 +561,17 @@ relative to that directory." ;; later when we are going to ;; display user and group names. (if numeric-uid-gid 'integer 'string)))) - (when (and (not show-all) eshell-ls-exclude-regexp) + (when (and show-almost-all + (not show-all)) + (setq entries + (remove-if + (lambda (entry) + (let ((filename (caar entry))) + (or (string= filename ".") + (string= filename "..")))) + entries))) + (when (and (not show-all) + eshell-ls-exclude-regexp) (while (and entries (string-match eshell-ls-exclude-regexp (caar entries))) (setq entries (cdr entries))) |