Function: eshell-pred-file-type
eshell-pred-file-type is a byte-compiled function defined in
em-pred.el.gz.
Signature
(eshell-pred-file-type TYPE)
Documentation
Return a test which tests that the file is of a certain TYPE.
TYPE must be a character, and should be one of the possible options
that ls -l will show in the first column of its display.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-pred.el.gz
(defun eshell-pred-file-type (type)
"Return a test which tests that the file is of a certain TYPE.
TYPE must be a character, and should be one of the possible options
that `ls -l' will show in the first column of its display."
(when (eq type ?%)
(setq type (char-after))
(if (memq type '(?b ?c))
(forward-char)
(setq type ?%)))
(let ((set (if (eq type ?%)
'(?b ?c)
(list type))))
(lambda (file)
(when-let ((attrs (eshell-file-attributes (directory-file-name file))))
(memq (aref (file-attribute-modes attrs) 0) set)))))