-;;; em-pred --- argument predicates and modifiers (ala zsh)
+;;; em-pred.el --- argument predicates and modifiers (ala zsh)
-;; Copyright (C) 1999, 2000 Free Sofware Foundation
+;; Copyright (C) 1999, 2000 Free Software Foundation
+
+;; Author: John Wiegley <johnw@gnu.org>
;; This file is part of GNU Emacs.
;; See the zsh docs for more on the syntax ([(zsh.info)Filename
;; Generation]).
+;;; Code:
+
;;; User Variables:
(defcustom eshell-pred-load-hook '(eshell-pred-initialize)
q escape special characters
S split string at any whitespace character
- S/PAT/ split string at each occurance of PAT
+ S/PAT/ split string at each occurrence of PAT
FOR LISTS OF ARGUMENTS:
o sort alphabetically
x/PAT/ exclude all members matching PAT
s/pat/match/ substitute PAT with MATCH
- g/pat/match/ substitute PAT with MATCH for all occurances
+ g/pat/match/ substitute PAT with MATCH for all occurrences
EXAMPLES:
*.c(:o) sorted list of .c files")
(defun eshell-pred-initialize ()
"Initialize the predicate/modifier code."
- (make-local-hook 'eshell-parse-argument-hook)
(add-hook 'eshell-parse-argument-hook
'eshell-parse-arg-modifier t t)
(define-key eshell-command-map [(meta ?q)] 'eshell-display-predicate-help)
(forward-char)
(setq type ?%)))
`(lambda (file)
- (let ((attrs (file-attributes (directory-file-name file))))
+ (let ((attrs (eshell-file-attributes (directory-file-name file))))
(if attrs
(memq (aref (nth 8 attrs) 0)
,(if (eq type ?%)
(setq amount (string-to-number (match-string 0)))
(goto-char (match-end 0))
`(lambda (file)
- (let ((attrs (file-attributes file)))
+ (let ((attrs (eshell-file-attributes file)))
(if attrs
(,(if (eq qual ?-)
'<
(setq amount (* (string-to-number (match-string 0)) quantum))
(goto-char (match-end 0))
`(lambda (file)
- (let ((attrs (file-attributes file)))
+ (let ((attrs (eshell-file-attributes file)))
(if attrs
(,(if (eq qual ?-)
'<
(lambda (str)
(split-string str ,sep))) lst))))
-;;; Code:
-
+;;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31
;;; em-pred.el ends here