MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.136.20.207
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/esh-var.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:55 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/eshell/esh-var.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!\210\302\303!\210\302\304!\210\302\305!\210\306\307\310\311\312\313\314\315&\210\316\317\310\320\321\322\323\324\314\307&	\210\316\325\310\326\323\327\314\307&\210\316\330\331\332\323\327\314\307&\210\316\333\310\334\323\327\314\307&\210\316\335\336\337\323\340\314\307&\210\316\341\342\343\323\344\314\307&\210\345\341\346\331#\207" [provide esh-var require esh-opt env ring custom-declare-group eshell-var nil "Variable interpolation is introduced whenever the '$' character\nappears unquoted in any argument (except when that argument is\nsurrounded by single quotes).  It may be used to interpolate a\nvariable value, a subcommand, or even the result of a Lisp form." :tag "Variable handling" :group eshell custom-declare-variable eshell-var-load-hook "A list of functions to call when loading `eshell-var'." :version "24.1" :type hook eshell-prefer-lisp-variables "If non-nil, prefer Lisp variables to environment variables." boolean eshell-complete-export-definition t "If non-nil, completing names for `export' shows current definition." eshell-modify-global-environment "If non-nil, using `export' changes Emacs's global environment." eshell-variable-name-regexp "[A-Za-z0-9_-]+" "A regexp identifying what constitutes a variable name reference.\nNote that this only applies for '$NAME'.  If the syntax '$<NAME>' is\nused, then NAME can contain any character, including angle brackets,\nif they are quoted with a backslash." regexp eshell-variable-aliases-list '(("COLUMNS" (lambda (indices) (window-width)) t) ("LINES" (lambda (indices) (window-height)) t) ("_" (lambda (indices) (if (not indices) (car (last eshell-last-arguments)) (eshell-apply-indices eshell-last-arguments indices)))) ("?" eshell-last-command-status) ("$" eshell-last-command-result) ("0" eshell-command-name) ("1" (lambda (indices) (nth 0 eshell-command-arguments))) ("2" (lambda (indices) (nth 1 eshell-command-arguments))) ("3" (lambda (indices) (nth 2 eshell-command-arguments))) ("4" (lambda (indices) (nth 3 eshell-command-arguments))) ("5" (lambda (indices) (nth 4 eshell-command-arguments))) ("6" (lambda (indices) (nth 5 eshell-command-arguments))) ("7" (lambda (indices) (nth 6 eshell-command-arguments))) ("8" (lambda (indices) (nth 7 eshell-command-arguments))) ("9" (lambda (indices) (nth 8 eshell-command-arguments))) ("*" (lambda (indices) (if (not indices) eshell-command-arguments (eshell-apply-indices eshell-command-arguments indices))))) "This list provides aliasing for variable references.\nIt is very similar in concept to what `eshell-user-aliases-list' does\nfor commands.  Each member of this defines defines the name of a\ncommand, and the Lisp value to return for that variable if it is\naccessed via the syntax '$NAME'.\n\nIf the value is a function, that function will be called with two\narguments: the list of the indices that was used in the reference, and\nwhether the user is requesting the length of the ultimate element.\nFor example, a reference of '$NAME[10][20]' would result in the\nfunction for alias `NAME' being called (assuming it were aliased to a\nfunction), and the arguments passed to this function would be the list\n'(10 20)', and nil." (repeat (list string sexp (choice (const :tag "Copy to environment" t) (const :tag "Use only in Eshell" nil)))) put risky-local-variable] 10)
#@38 Initialize the variable handle code.
(defalias 'eshell-var-initialize #[nil "\204
\306\301!\210\307\310	\"\311\n\312\313#\210\306\303!\210\314\315\"\306\304!\210\314\f\316\"\317\320\321\322\211$\210\317\323\324\325\322$\210\326\211>)\205J\317\327\330\325\322$\210\317\327\331\325\322$\207" [eshell-modify-global-environment process-environment eshell-command-map eshell-special-chars-inside-quoting eshell-special-chars-outside-quoting module make-local-variable mapcar concat define-key [(meta 118)] eshell-insert-envvar append (36) (36) add-hook eshell-parse-argument-hook eshell-interpolate-variable t eshell-prepare-command-hook eshell-handle-local-variables nil eshell-cmpl pcomplete-try-first-hook eshell-complete-variable-reference eshell-complete-variable-assignment eshell-modules-list] 6 (#$ . 3894)])
#@50 Allow for the syntax 'VAR=val <command> <args>'.
(defalias 'eshell-handle-local-variables #[nil "\204	\203	@	A\202\306\307!	\205a\310\f\"\205a\311\312\313\314\315C\316C\310\f\"\203T
\317\320\321\"\320\322\"\320\322\"G\323UFC\244\210\307\n@!\nA\202-
A)\324\325\nDEC#D\"+\207" [eshell-last-command-name eshell-last-arguments args command setvar l "\\`\\([A-Za-z_][A-Za-z0-9_]*\\)=\\(.*\\)\\'" eshell-stringify string-match throw eshell-replace-command eshell-as-subcommand append progn t setenv match-string 1 2 0 eshell-named-command quote] 12 (#$ . 4722)])
#@103 Parse a variable interpolation.
This function is explicit for adding to `eshell-parse-argument-hook'.
(defalias 'eshell-interpolate-variable #[nil "\300f\301=\205`TdU?\205\300u\210\302\303 D\207" [nil 36 eshell-escape-arg eshell-parse-variable] 2 (#$ . 5313)])
#@38 Define a VAR-ALIAS using DEFINITION.
(defalias 'eshell/define #[(var-alias definition) "\204\305\306	\n\"\n\"\2027\306	\n\"	\307G\310U\203!@\202\"DD\211\2032\305\306	\n\"\n\"\nB*\311\207" [definition var-alias eshell-variable-aliases-list alias-def def delq assoc quote 1 nil] 6 (#$ . 5584)])
#@69 This alias allows the `export' command to act as bash users expect.
(defalias 'eshell/export #[(&rest sets) "\205'@;\203\301\302@\"\203\303\304\305@\"\304\306@\"\"\210A\211\204\307\207" [sets string-match "^\\([^=]+\\)=\\(.*\\)" setenv match-string 1 2 nil] 6 (#$ . 5899)])
#@44 Completion function for Eshell's `export'.
(defalias 'pcomplete/eshell-mode/export #[nil "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[nil "\203	\207\302 \207" [eshell-complete-export-definition process-environment eshell-envvar-names] 1] nil] 5 (#$ . 6193)])
#@32 Unset an environment variable.
(defalias 'eshell/unset #[(&rest args) "\205@;\203\301@\302\303#\210A\211\204\302\207" [args setenv nil t] 5 (#$ . 6476)])
#@43 Completion function for Eshell's `unset'.
(defalias 'pcomplete/eshell-mode/unset #[nil "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[nil "\300 \207" [eshell-envvar-names] 1] nil] 5 (#$ . 6647)])
#@34 Allow command-ish use of `setq'.
(defalias 'eshell/setq #[(&rest args) "\305	\203!\306	@!	\211A@)\211L	\211AA)*\202)\207" [last-value args x val sym nil intern] 3 (#$ . 6862)])
#@42 Completion function for Eshell's `setq'.
(defalias 'pcomplete/eshell-mode/setq #[nil "\300\301\302\211\211$\205\300\303\302\211\211$\205\202\207" [pcomplete--here #[nil "\302	\303#\207" [pcomplete-stub obarray all-completions boundp] 4] nil #[nil "\300\207" [nil] 1]] 5 (#$ . 7057)])
#@34 Implementation of `env' in Lisp.
(defalias 'eshell/env #[(&rest args) "\305 \210\306!\307\310\")\311\211\211\211\312\313\314\315#-\207" [args temp-args ext-command last-value usage-msg eshell-init-print-buffer eshell-flatten-list mapcar eshell-stringify nil eshell-do-opt "env" ((104 "help" nil nil "show this usage screen") :external "env" :usage "<no arguments>") #[nil "\302\303 \304\"\305\211\203	@\306\307\"\210	A\211\204\f*\310 \207" [setting --dolist-tail-- sort eshell-environment-variables string-lessp nil eshell-buffered-print "\n" eshell-flush] 4]] 4 (#$ . 7354)])
#@54 Insert ENVVAR-NAME into the current buffer at point.
(defalias 'eshell-insert-envvar #[(envvar-name) "\301\302\"\207" [envvar-name insert-and-inherit "$"] 3 (#$ . 7953) (list (read-envvar-name "Name of environment variable: " t))])
#@64 Return a list of currently visible environment variable names.
(defalias 'eshell-envvar-names #[(&optional environment) "\302\303\206	\"\207" [environment process-environment mapcar #[(x) "\301\302\303\"O\207" [x 0 string-match "="] 5]] 3 (#$ . 8192)])
#@169 Return a `process-environment', fully updated.
This involves setting any variable aliases which affect the
environment, as specified in `eshell-variable-aliases-list'.
(defalias 'eshell-environment-variables #[nil "\304\305\"	\306\211\203,@\307\n8\203%\310\n@\311\312\n@!\206\"\313!\"\210A\211\204
*)\207" [process-environment eshell-variable-aliases-list var-alias --dolist-tail-- mapcar concat nil 2 setenv eshell-stringify eshell-get-variable ""] 6 (#$ . 8457)])
#@333 Parse the next variable reference at point.
The variable name could refer to either an environment variable, or a
Lisp variable.  The priority order depends on the setting of
`eshell-prefer-lisp-variables'.

Its purpose is to call `eshell-parse-variable-ref', and then to
process any indices that come after the variable reference.
(defalias 'eshell-parse-variable #[nil "\303f\304=\205\303u\210\305\303\211\306 m?\205!\303f\307=\205!\310 \311\302\312\nDDC	E\2036\313	D\2027	+\207" [get-len value indices nil 35 t eshell-parse-variable-ref 91 eshell-parse-indices let quote length] 5 (#$ . 8943)])
#@349 Eval a variable reference.
Returns a Lisp form which, if evaluated, will return the value of the
variable.

Possible options are:

  NAME          an environment or Lisp variable value
  <LONG-NAME>   disambiguates the length of the name
  {COMMAND}     result of command is variable's value
  (LISP-FORM)   result of Lisp form is variable's value
(defalias 'eshell-parse-variable-ref #[nil "\306\211f\307=\203-\310\307\311\"\211\204\312\313\307\"\202)\314\315\316\317`TB!DDDTb\210)\202\336\306f\320>\203Q\306f\321=\203@\322 \202B\323 \211\205M\324\325	!\326E)\202\336\306f\327=\203\241\310\327\330\"\211\204h\312\313\327\"\202\235\331\n!`T{\332Q\333\334\335\336\337DEDC\340\316\317\f!D\341\342\343\344\345\346\306\347DEDDED\336DFETb\210*)\202\336\306f\350=\203\257\351\352\353\217\202\336\354\355\306f!
\"\203\307\306u\210\324\355`Sf!\326E\202\336\3563!\203\333\324\357\360!\326E\360\225b\210\202\336\361\362!)\207" [end name temporary-file-directory temp cmd eshell-variable-aliases-list nil 123 eshell-find-delimiter 125 throw eshell-incomplete eshell-convert eshell-command-to-value eshell-as-subcommand eshell-parse-command (39 34) 39 eshell-parse-literal-quote eshell-parse-double-quote eshell-get-variable eval indices 60 62 make-temp-file " > " let eshell-current-handles eshell-create-handles quote overwrite progn ignore nconc eshell-this-command-hook list function lambda delete-file 40 err (byte-code "\300\301\302\303p!DDD\207" [eshell-command-to-value eshell-lisp-command quote read] 5) ((end-of-file (byte-code "\300\301\302\"\207" [throw eshell-incomplete 40] 3))) assoc char-to-string looking-at match-string 0 error "Invalid variable reference" eshell-variable-name-regexp] 14 (#$ . 9561)])
#@45 Parse and return a list of list of indices.
(defalias 'eshell-parse-indices #[nil "\303\303f\304=\203/\305\304\306\"\211\204\307\310\304\"\210\202+\303u\210\303\311`	\"B)	Tb\210)\202\237)\207" [indices end eshell-glob-function nil 91 eshell-find-delimiter 93 throw eshell-incomplete eshell-parse-arguments] 4 (#$ . 11311)])
#@38 Get the value for the variable NAME.
(defalias 'eshell-get-variable #[(name &optional indices) "\306	\"\211\203\n\211A@)\202\n\203$\307\f!\203$\f
!\202d\310\f;\203R\311\f!\211\203K\312!\203K\204E\313\f!\204KJ\202N\313\f!)\202b\f9\203\\\fJ\202b\314\315\316\f!\"
\"*\207" [name eshell-variable-aliases-list alias x var indices assoc functionp eshell-apply-indices intern-soft boundp getenv error "Unknown variable `%s'" eshell-stringify sym eshell-prefer-lisp-variables] 6 (#$ . 11653)])
#@728 Apply to VALUE all of the given INDICES, returning the sub-result.
The format of INDICES is:

  ((INT-OR-NAME-OR-OTHER INT-OR-NAME INT-OR-NAME ...)
   ...)

Each member of INDICES represents a level of nesting.  If the first
member of a sublist is not an integer or name, and the value it's
reference is a string, that will be used as the regexp with which is
to divide the string into sub-parts.  The default is whitespace.
Otherwise, each INT-OR-NAME refers to an element of the list value.
Integers imply a direct index, and names, an associate lookup using
`assoc'.

For example, to retrieve the second element of a user's record in
'/etc/passwd', the variable reference would look like:

  ${egrep johnw /etc/passwd}[: 2]
(defalias 'eshell-apply-indices #[(value indices) "\203\201@\n;\203:\306\211@@);\2031\307\310
\311Q\211@@)\"\2041\211@@)	A\312\313\314\n\"\")	G\315W\203K\316\317\320	!\"\210\202y	G\321U\203[\322\n	@\"\202y\323C	\203t\322\n	@\"C\244\210	A\211\204cA))A\211\204\n\207" [indices refs value separator x eshell-variable-name-regexp nil string-match "^" "$" mapcar eshell-convert split-string 0 error "Invalid array variable index: %s" eshell-stringify 1 eshell-index-value t new-value] 6 (#$ . 12175)])
#@40 Reference VALUE using the given INDEX.
(defalias 'eshell-index-value #[(value index) ";\203\302	\"A\207\303	!\203\"\304	!V\203\305\306!\207\307	\"\207	<\2036	GV\2032\305\310!\207	8\207\311	!\203K	GV\203G\305\312!\207	H\207\305\313!\207" [index value assoc ring-p ring-length error "Index exceeds length of ring" ring-ref "Index exceeds length of list" vectorp "Index exceeds length of vector" "Invalid data type for indexing"] 3 (#$ . 13442)])
#@48 If there is a variable reference, complete it.
(defalias 'eshell-complete-variable-reference #[nil "\304\211\305\"`{\266\202\304\306\307\n\310Q	\"\211\205$	T\304O\311\312\313 \"*\207" [index arg eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\$\\(" "\\)?\\'" throw pcomplete-completions eshell-variables-list] 5 (#$ . 13909)])
#@40 Generate list of applicable variables.
(defalias 'eshell-variables-list #[nil "\306\306\211\203%
@\307\310\nP\f@\"\203\f@	B
A\211\204\f*\311\312\313\314\315\316 !\"\317\n\320#	#\321\"*\207" [pcomplete-stub completions argname eshell-variable-aliases-list alias --dolist-tail-- nil string-match "^" sort append mapcar #[(varname) "\302!\211\203	;\203\303	!\203\304P\202)\207" [varname value eshell-get-variable file-directory-p "/"] 3] eshell-envvar-names eshell-environment-variables all-completions boundp string-lessp obarray] 8 (#$ . 14281)])
#@65 If there is a variable assignment, allow completion of entries.
(defalias 'eshell-complete-variable-assignment #[nil "\304\211\305\"`{\266\202\304\306\307\n\310Q	\"\205.\311\225\306\312	\"\203$\313\225	\304O\314\315\316 \"*\207" [pos arg eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\`" "=" 0 "\\(:\\)[^:]*\\'" 1 throw pcomplete-completions pcomplete-entries] 5 (#$ . 14860)])

MMCT - 2023