comparison lisp/eshell/em-ls.el @ 39984:5e4848f89017

(eshell-ls-dired-initial-args): Added an extra customization variable, to differentiate ls-in-dired from regular uses of ls.
author John Wiegley <johnw@newartisans.com>
date Wed, 17 Oct 2001 02:00:00 +0000
parents 67b464da13ec
children 8a4077ab418c
comparison
equal deleted inserted replaced
39983:baefc4f3c437 39984:5e4848f89017
57 :type 'hook 57 :type 'hook
58 :group 'eshell-ls) 58 :group 'eshell-ls)
59 59
60 (defcustom eshell-ls-initial-args nil 60 (defcustom eshell-ls-initial-args nil
61 "*If non-nil, this list of args is included before any call to `ls'. 61 "*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."
63 :type '(repeat :tag "Arguments" string)
64 :group 'eshell-ls)
65
66 (defcustom eshell-ls-dired-initial-args nil
67 "*If non-nil, args is included before any call to `ls' in dired.
62 This is useful for enabling human-readable format (-h), for example." 68 This is useful for enabling human-readable format (-h), for example."
63 :type '(repeat :tag "Arguments" string) 69 :type '(repeat :tag "Arguments" string)
64 :group 'eshell-ls) 70 :group 'eshell-ls)
65 71
66 (defcustom eshell-ls-use-in-dired nil 72 (defcustom eshell-ls-use-in-dired nil
261 (delq (current-buffer) 267 (delq (current-buffer)
262 (symbol-value 'font-lock-buffers))))) 268 (symbol-value 'font-lock-buffers)))))
263 (let ((insert-func 'insert) 269 (let ((insert-func 'insert)
264 (error-func 'insert) 270 (error-func 'insert)
265 (flush-func 'ignore) 271 (flush-func 'ignore)
266 eshell-ls-initial-args) 272 eshell-ls-dired-initial-args)
267 (eshell-do-ls (append switches (list file)))))))) 273 (eshell-do-ls (append switches (list file))))))))
268 274
269 (defsubst eshell/ls (&rest args) 275 (defsubst eshell/ls (&rest args)
270 "An alias version of `eshell-do-ls'." 276 "An alias version of `eshell-do-ls'."
271 (let ((insert-func 'eshell-buffered-print) 277 (let ((insert-func 'eshell-buffered-print)