MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.116.81.133
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/eshell/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/eshell/em-pred.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:51 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/eshell/em-pred.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\302\312\313\314\315\316\306\301&	\210\310\317\320\321\315\322\306\301&\210\323\317\324\325#\210\310\326\327\330\315\331\306\301&\210\323\326\324\325#\207" [custom-declare-group eshell-pred nil "This module allows for predicates to be applied to globbing\npatterns (similar to zsh), in addition to string modifiers which can\nbe applied either to globbing results, variable references, or just\nordinary strings." :tag "Value modifiers and predicates" :group eshell-module custom-declare-variable eshell-pred-load-hook "A list of functions to run when `eshell-pred' is loaded." :version "24.1" :type hook eshell-predicate-alist '((47 eshell-pred-file-type 100) (46 eshell-pred-file-type 45) (115 eshell-pred-file-type 115) (112 eshell-pred-file-type 112) (64 eshell-pred-file-type 108) (37 eshell-pred-file-type 37) (114 eshell-pred-file-mode 400) (119 eshell-pred-file-mode 200) (120 eshell-pred-file-mode 100) (65 eshell-pred-file-mode 40) (73 eshell-pred-file-mode 20) (69 eshell-pred-file-mode 10) (82 eshell-pred-file-mode 4) (87 eshell-pred-file-mode 2) (88 eshell-pred-file-mode 1) (115 eshell-pred-file-mode 4000) (83 eshell-pred-file-mode 2000) (116 eshell-pred-file-mode 1000) (85 function (lambda (file) (if (file-exists-p file) (= (nth 2 (file-attributes file)) (user-uid))))) (42 function (lambda (file) (and (file-regular-p file) (not (file-symlink-p file)) (file-executable-p file)))) (108 eshell-pred-file-links) (117 eshell-pred-user-or-group 117 "user" 2 'eshell-user-id) (103 eshell-pred-user-or-group 103 "group" 3 'eshell-group-id) (97 eshell-pred-file-time 97 "access" 4) (109 eshell-pred-file-time 109 "modification" 5) (99 eshell-pred-file-time 99 "change" 6) (76 eshell-pred-file-size)) "A list of predicates than can be applied to a globbing pattern.\nThe format of each entry is\n\n  (CHAR . PREDICATE-FUNC-SEXP)" (repeat (cons character sexp)) put risky-local-variable t eshell-modifier-alist '((69 function (lambda (lst) (mapcar #'(lambda (str) (eshell-stringify (car (eshell-parse-argument str)))) lst))) (76 function (lambda (lst) (mapcar 'downcase lst))) (85 function (lambda (lst) (mapcar 'upcase lst))) (67 function (lambda (lst) (mapcar 'capitalize lst))) (104 function (lambda (lst) (mapcar 'file-name-directory lst))) (105 eshell-include-members) (120 eshell-include-members t) (114 function (lambda (lst) (mapcar 'file-name-sans-extension lst))) (101 function (lambda (lst) (mapcar 'file-name-extension lst))) (116 function (lambda (lst) (mapcar 'file-name-nondirectory lst))) (113 function (lambda (lst) (mapcar 'eshell-escape-arg lst))) (117 function (lambda (lst) (eshell-uniqify-list lst))) (111 function (lambda (lst) (sort lst 'string-lessp))) (79 function (lambda (lst) (nreverse (sort lst 'string-lessp)))) (106 eshell-join-members) (83 eshell-split-members) (82 quote reverse) (103 progn (forward-char) (if (eq (char-before) 115) (eshell-pred-substitute t) (error "`g' modifier cannot be used alone"))) (115 eshell-pred-substitute)) "A list of modifiers than can be applied to an argument expansion.\nThe format of each entry is\n\n  (CHAR ENTRYWISE-P MODIFIER-FUNC-SEXP)" (repeat (cons character sexp))] 10)
(defvar eshell-predicate-help-string "Eshell predicate quick reference:\n\n  -  follow symbolic references for predicates after the `-'\n  ^  invert sense of predicates after the `^'\n\nFILE TYPE:\n  /  directories              s  sockets\n  .  regular files            p  named pipes\n  *  executable (files only)  @  symbolic links\n\n  %x  file type == `x' (as by ls -l; so `c' = char device, etc.)\n\nPERMISSION BITS (for owner/group/world):\n  r/A/R  readable    s  setuid\n  w/I/W  writable    S  setgid\n  x/E/X  executable  t  sticky bit\n\nOWNERSHIP:\n  U               owned by effective uid\n  u(UID|'user')   owned by UID/user\n  g(GID|'group')  owned by GID/group\n\nFILE ATTRIBUTES:\n  l[+-]N                 +/-/= N links\n  a[Mwhms][+-](N|'FILE') access time +/-/= N months/weeks/hours/mins/secs\n			 (days if unspecified) if FILE specified,\n			 use as comparison basis; so a+'file.c'\n			 shows files accessed before file.c was\n			 last accessed\n  m[Mwhms][+-](N|'FILE') modification time...\n  c[Mwhms][+-](N|'FILE') change time...\n  L[kmp][+-]N            file size +/-/= N Kb/Mb/blocks\n\nEXAMPLES:\n  *(^@)         all non-dot files which are not symlinks\n  .#*(^@)       all files which are not symbolic links\n  **/.#*(*)     all executable files, searched recursively\n  ***/*~f*(-/)  recursively (though not traversing symlinks),\n		find all directories (or symlinks referring to\n		directories) whose names do not begin with f.\n  e*(*Lk+50)    executables 50k or larger beginning with 'e'")
(defvar eshell-modifier-help-string "Eshell modifier quick reference:\n\nFOR SINGLE ARGUMENTS, or each argument of a list of strings:\n  E  evaluate again\n  L  lowercase\n  U  uppercase\n  C  capitalize\n  h  dirname\n  t  basename\n  e  file extension\n  r  strip file extension\n  q  escape special characters\n\n  S       split string at any whitespace character\n  S/PAT/  split string at each occurrence of PAT\n\nFOR LISTS OF ARGUMENTS:\n  o  sort alphabetically\n  O  reverse sort alphabetically\n  u  uniq list (typically used after :o or :O)\n  R  reverse list\n\n  j       join list members, separated by a space\n  j/PAT/  join list members, separated by PAT\n  i/PAT/  exclude all members not matching PAT\n  x/PAT/  exclude all members matching PAT\n\n  s/pat/match/  substitute PAT with MATCH\n  g/pat/match/  substitute PAT with MATCH for all occurrences\n\nEXAMPLES:\n  *.c(:o)  sorted list of .c files")
(defalias 'eshell-display-predicate-help #[nil "\300\301!\207" [with-electric-help #[nil "c\207" [eshell-predicate-help-string] 1]] 2 nil nil])
(defalias 'eshell-display-modifier-help #[nil "\300\301!\207" [with-electric-help #[nil "c\207" [eshell-modifier-help-string] 1]] 2 nil nil])
#@41 Initialize the predicate/modifier code.
(defalias 'eshell-pred-initialize #[nil "\301\302\303\304\211$\210\305\306\307#\210\305\310\311#\207" [eshell-command-map add-hook eshell-parse-argument-hook eshell-parse-arg-modifier t define-key [(meta 113)] eshell-display-predicate-help [(meta 109)] eshell-display-modifier-help] 5 (#$ . 6506)])
#@53 Apply to LIST a series of PREDICATES and MODIFIERS.
(defalias 'eshell-apply-modifiers #[(lst predicates modifiers) "\304	;\203\f	C\305	<\2058\306	\304\n#\203'@	!A\211\204\2037	G\307U\2037	@\2028	)\207" [stringified lst predicates modifiers nil t eshell-winnow-list 1] 5 (#$ . 6853)])
#@134 Parse a modifier that has been specified after an argument.
This function is specially for adding onto `eshell-parse-argument-hook'.
(defalias 'eshell-parse-arg-modifier #[nil "\306f\307=\205b\306u\210\310\307\311\"\211\204\312\313\307\"\202aT\211\206\"`\211dU\206-	f\n>*\205a\214`}\210\314 \211@A\f\204G
\203Z\315\316\317\320\321\322\fD\322
DFEC\",Tb\210\323 )\207" [end pos eshell-delimiter-argument-list modifiers preds mods nil 40 eshell-find-delimiter 41 throw eshell-incomplete eshell-parse-modifiers append lambda (lst) eshell-apply-modifiers lst quote eshell-finish-arg eshell-current-modifiers] 10 (#$ . 7162)])
#@474 Parse value modifiers and predicates at point.
If ALLOW-PREDS is non-nil, predicates will be parsed as well.
Return a cons cell of the form

  (PRED-FUNC-LIST . MOD-FUNC-LIST)

NEW-STRING is STRING minus any modifiers.  PRED-FUNC-LIST is a list of
predicate functions.  MOD-FUNC-LIST is a list of result modifier
functions.  PRED-FUNCS take a filename and return t if the test
succeeds; MOD-FUNCS take any string and preform a modification,
returning the resultant string.
(defalias 'eshell-parse-modifiers #[nil "\305\211\211\211\211\306\307\310\217\210	\237\237-B\207" [mods preds follow negate result nil err (byte-code "m\204\356\306f\211\307=\203@\306u\210\310\311!\2039\312p!\211\203.\313	!\203.\314	\n\f$\2025\315\316\317	!\"\210)\202\352\315\320!\210\202\352\321=\203O\306u\210?\202\352\322=\203^\306u\210\f?\202\352\323=\203\235\306u\210\310\311!\203\226\312p!\211\203\213\313	!\203\213\324\325\326\327	D\330BBE
B\202\222\315\331\317	!\"\210)\202\352\315\332!\210\202\352\333=\203\311\306u\210\306f\236\211 \204\272\315\334\306f\"\210\202\305\306u\210\335 A!
B)\202\352!\236\211\"\204\333\315\336\"\210\202\351\306u\210\314\335\"A!\n\f$))\202\306\207" [char func preds negate follow mods nil 39 looking-at "[^|':]" read functionp eshell-add-pred-func error "Invalid function predicate '%s'" eshell-stringify "Invalid function predicate" 94 45 124 lambda (lst) mapcar function (lst) "Invalid function modifier '%s'" "Invalid function modifier" 58 "Unknown modifier character '%c'" eval "Unknown predicate character '%c'" eshell-modifier-alist mod eshell-predicate-alist pred] 6) ((end-of-buffer (error "Predicate or modifier ended prematurely")))] 5 (#$ . 7813)])
#@43 Add the predicate function PRED to FUNCS.
(defalias 'eshell-add-pred-func #[(pred funcs negate follow) "\203\304\305\306\307	\310BBDE\n\203\304\311\307	\312BBE	B\207" [negate pred follow funcs lambda (file) not funcall (file) (file) ((file-truename file))] 6 (#$ . 9549)])
#@72 Return a predicate to test whether a file match a given user/group id.
(defalias 'eshell-pred-user-or-group #[(mod-char mod-type attr-index get-id-func) "\306\211\211\211\307\310!\203\311\312\313!!\313\225b\210\202O\306f\211\314>\211\2030\315\316	G\"@\2022\n\306u\210\317\n	\"\211\204D\320\321\f
#\210`{!Tb\210\204Y\320\322\f
#\210\323\324\325\326\327\330\331\332\333BBEEEE,\207" [end close open ugid mod-type mod-char nil looking-at "[0-9]+" string-to-number match-string 0 (40 91 60 123) last (41 93 62 125) eshell-find-delimiter error "Malformed %s name string for modifier `%c'" "Unknown %s name specified for modifier `%c'" lambda (file) let ((attrs (file-attributes file))) if attrs = nth (attrs) get-id-func attr-index] 11 (#$ . 9836)])
#@67 Return a predicate to test whether a file matches a certain time.
(defalias 'eshell-pred-file-time #[(mod-char mod-type attr-index) "\306\307\211\307\211\307\211/\307f\310>\203P\307f\211\311=\203$\312\202M\313=\203/\314\202M\315=\203:\316\202M\317=\203E\320\202M\321=\203M\322\307u\210\307f\323>\203]\307f\307u\210\324\325!\203u\326 \327\330\331!!_Z\331\225b\210\202\305\307f\211\332>\211\203\212\333\334
G\"@\202\214\f\307u\210\335\f
\"\211/\204\241\336\33701#\210`/{2\3402!\211'\204\267\336\3412\"\210\3263'8!*/Tb\210\342\343\344\345\346\347	\350=\203\325\351\202\340	\352=\203\337\353\202\340\354\326\3553\356BBDEEEE.\207" [quantum qual amount when open close 86400 nil (77 119 104 109 115) 77 2592000 119 604800 104 3600 109 60 115 1 (43 45) looking-at "[0-9]+" float-time string-to-number match-string 0 (40 91 60 123) last (41 93 62 125) eshell-find-delimiter error "Malformed %s time modifier `%c'" file-attributes "Cannot stat file `%s'" lambda (file) let ((attrs (file-attributes file))) if attrs 45 < 43 > = nth (attrs) end mod-type mod-char file attr-index] 13 (#$ . 10612)])
#@191 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. 
(defalias 'eshell-pred-file-type #[(type) "\301=\203\302f\211\303>\203\302u\210\202\301\304\305\306\307\310\311\312\313\301=\203)\314\202-\315CDEEEE\207" [type 37 nil (98 99) lambda (file) let ((attrs (eshell-file-attributes (directory-file-name file)))) if attrs memq (aref (nth 8 attrs) 0) (98 99) quote] 11 (#$ . 11766)])
#@59 Return a test which tests that MODE pertains to the file.
(defalias 'eshell-pred-file-mode #[(mode) "\301\302\303\304\305\306\307\310BBEEE\207" [mode lambda (file) let ((modes (file-modes file))) if modes logand (modes)] 9 (#$ . 12300)])
(put 'eshell-pred-file-mode 'byte-optimizer 'byte-compile-inline-expand)
#@72 Return a predicate to test whether a file has a given number of links.
(defalias 'eshell-pred-file-links #[nil "\302\211\302f\303>\203\302f\302u\210\304\305!\204\306\307!\210\310\311\312!!\312\225b\210\313\314\315\316\317\320	\321=\2035\322\202@	\323=\203?\324\202@\325\326EEEE*\207" [amount qual nil (45 43) looking-at "[0-9]+" error "Invalid file link count modifier `l'" string-to-number match-string 0 lambda (file) let ((attrs (eshell-file-attributes file))) if attrs 45 < 43 > = (nth 1 attrs)] 9 (#$ . 12618)])
#@63 Return a predicate to test whether a file is of a given size.
(defalias 'eshell-pred-file-size #[nil "\303\304\211\304f\227\305>\2033\304f\227\211\306=\203\307\2020	\310=\203(\311\2020	\312=\2030\313\304u\210\304f\314>\203@\304f\304u\210\315\316!\204J\317\320!\210\321\322\323!!\n_\323\225b\210\324\325\326\327\330\331	\332=\203f\333\202q	\334=\203p\335\202q\336\337EEEE+\207" [amount qual quantum 1 nil (107 109 112) 107 1024 109 1048576 112 512 (45 43) looking-at "[0-9]+" error "Invalid file size modifier `L'" string-to-number match-string 0 lambda (file) let ((attrs (eshell-file-attributes file))) if attrs 45 < 43 > = (nth 7 attrs)] 10 (#$ . 13154)])
#@58 Return a modifier function that will substitute matches.
(defalias 'eshell-pred-substitute #[(&optional repeat) "\305f\305\211\211\305u\210\306\211\305\211\307%\310`\"Tb\210\306\211\305\211\307%\310`\"Tb\210\f\203Y\311\312\313\314\311\315\316\317\320\321\322\323\n\324BBE\321\325\326	\327BBEEE\330BBBD\331BBE\202w\311\332\313\314\311\333\334\323\n\335BB\321\325\326	\336BBEE\337BBBD\340BBE,\207" [end replace match delim repeat nil eshell-find-delimiter t buffer-substring-no-properties lambda (lst) mapcar function (str) let ((i 0)) while setq i string-match (str i) str replace-match (t nil str) (str) (lst) (lst) (str) if (str) (t nil str) (str) (lst)] 15 (#$ . 13841)])
#@46 Include only lisp members matching a regexp.
(defalias 'eshell-include-members #[(&optional invert-p) "\304f\304\211\304u\210\305\n\211\304\211\306%\307`\"Tb\210\310\311\312\313\304\314\310\315\2031\316\317	\320BBD\2026\317	\321BBECDFE+\207" [end regexp delim invert-p nil eshell-find-delimiter t buffer-substring-no-properties lambda (lst) eshell-winnow-list lst quote (elem) not string-match (elem) (elem)] 12 (#$ . 14537)])
#@47 Return a modifier function that join matches.
(defalias 'eshell-join-members #[nil "\303f\303\211\211\304>\204\305\202&\303u\210\306\n\211\303\211\307%\310`\"Tb\210\311\312\313\314\315	FE+\207" [end str delim nil (39 47) " " eshell-find-delimiter t buffer-substring-no-properties lambda (lst) mapconcat 'identity lst] 7 (#$ . 14980)])
#@49 Return a modifier function that splits members.
(defalias 'eshell-split-members #[nil "\303f\303\211\211\304>\203!\303u\210\305\n\211\303\211\306%\307`\"Tb\210\310\311\312\313\310\314\315\316	EED\317BBE+\207" [end sep delim nil (39 47) eshell-find-delimiter t buffer-substring-no-properties lambda (lst) mapcar function (str) split-string str (lst)] 10 (#$ . 15332)])
(provide 'em-pred)

MMCT - 2023