403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/eshell/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/eshell/esh-var.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\311\312\313\314\315\316\317\320&\210\321\322\323\324\325DD\326\327\330\331\332&\210\321\333\323\324\334DD\335\331\336%\210\321\337\323\324\340DD\341\331\336%\210\321\342\323\324\343DD\344\331\336%\210\321\345\323\324\346DD\347\331\350%\210\321\351\323\324\352DD\353\331\354%\210\355\351\356\357#\207" [require esh-util esh-cmd esh-opt esh-module esh-arg esh-io pcomplete 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 funcall function #[0 "\300\207" [nil] 1 #1=""] "A list of functions to call when loading `eshell-var'." :version "24.1" :type hook eshell-prefer-lisp-variables #[0 "\300\207" [nil] 1 #1#] "If non-nil, prefer Lisp variables to environment variables." boolean eshell-complete-export-definition #[0 "\300\207" [t] 1 #1#] "If non-nil, completing names for `export' shows current definition." eshell-modify-global-environment #[0 "\300\207" [nil] 1 #1#] "If non-nil, using `export' changes Emacs's global environment." eshell-variable-name-regexp #[0 "\300\207" ["[A-Za-z0-9_-]+"] 1 #1#] "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 #[0 "\300\301\302BB\303\304\305BB\306\307D\310\311\312\313\314D\315\316D\317\320D\321\322D\323\324D\325\326D\327\330D\331\332D\333\334D\335\336D\257\207" ["COLUMNS" #[257 "\300 \207" [window-width] 2 "\n\n(fn INDICES)"] (t) "LINES" #[257 "\300 \207" [window-height] 2 "\n\n(fn INDICES)"] (t) "_" #[257 "\211\204	\301!@\207\302\"\207" [eshell-last-arguments last eshell-apply-indices] 4 "\n\n(fn INDICES)"] ("?" eshell-last-command-status) ("$" eshell-last-command-result) ("0" eshell-command-name) "1" #[257 "@\207" [eshell-command-arguments] 2 "\n\n(fn INDICES)"] "2" #[257 "A@\207" [eshell-command-arguments] 2 "\n\n(fn INDICES)"] "3" #[257 "\3018\207" [eshell-command-arguments 2] 3 "\n\n(fn INDICES)"] "4" #[257 "\3018\207" [eshell-command-arguments 3] 3 "\n\n(fn INDICES)"] "5" #[257 "\3018\207" [eshell-command-arguments 4] 3 "\n\n(fn INDICES)"] "6" #[257 "\3018\207" [eshell-command-arguments 5] 3 "\n\n(fn INDICES)"] "7" #[257 "\3018\207" [eshell-command-arguments 6] 3 "\n\n(fn INDICES)"] "8" #[257 "\3018\207" [eshell-command-arguments 7] 3 "\n\n(fn INDICES)"] "9" #[257 "\3018\207" [eshell-command-arguments 8] 3 "\n\n(fn INDICES)"] "*" #[257 "\211\204\207\301\"\207" [eshell-command-arguments eshell-apply-indices] 4 "\n\n(fn INDICES)"]] 17 #1#] "This list provides aliasing for variable references.\nEach member defines the name of a variable, and a Lisp value used to\ncompute the string value that will be returned when the variable is\naccessed via the syntax `$NAME'.\n\nIf the value is a function, call that function with two arguments: the\nlist of the indices that was used in the reference, and whether the\nuser is requesting the length of the ultimate element.  For example, a\nreference of `$NAME[10][20]' would result in the function for alias\n`NAME' being called (assuming it were aliased to a function), and the\narguments passed to this function would be the list '(10 20)', and\nnil.\n\nIf the value is a string, return the value for the variable with that\nname in the current environment.  If no variable with that name exists\nin the environment, but if a symbol with that same name exists and has\na value bound to it, return its value instead.  You can prioritize\nsymbol values over environment values by setting\n`eshell-prefer-lisp-variables' to t.\n\nIf the value is a symbol, return the value bound to it.\n\nIf the value has any other type, signal an error.\n\nAdditionally, each member may specify if it should be copied to the\nenvironment of created subprocesses." (repeat (list string sexp (choice (const :tag "Copy to environment" t) (const :tag "Use only in Eshell" nil)))) put risky-local-variable t] 8)
(defvar eshell-var-mode-map (byte-code "\300 \301\302\303#\210\207" [make-sparse-keymap define-key [3 134217846] eshell-insert-envvar] 5))
#@99 Non-nil if Eshell-Var mode is enabled.
Use the command `eshell-var-mode' to change this variable.
(defvar eshell-var-mode nil (#$ . 4634))
(make-variable-buffer-local 'eshell-var-mode)
#@615 Minor mode for the esh-var module.

This is a minor mode.  If called interactively, toggle the `Eshell-Var
mode' mode.  If the prefix argument is positive, enable the mode, and
if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is `toggle'.  Enable the
mode if ARG is nil, omitted, or is a positive number.  Disable the
mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer,
evaluate `eshell-var-mode'.

The mode's hook is called both when the mode is enabled and when it is
disabled.

\{eshell-var-mode-map}

(fn &optional ARG)
(defalias 'eshell-var-mode #[256 "\302 \303=\203
?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300	\"\2031\300	B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [eshell-var-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks eshell-var-mode-hook eshell-var-mode-on-hook eshell-var-mode-off-hook called-interactively-p any message "Eshell-Var mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 4826) (byte-code "\203\n\301!\202\302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)])
(defvar eshell-var-mode-hook nil)
(byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\310\211%\207" [eshell-var-mode-map eshell-var-mode-hook variable-documentation put "Hook run after entering or leaving `eshell-var-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode eshell-var-mode] 6)
#@38 Initialize the variable handle code.
(defalias 'eshell-var-initialize #[0 "\204
\305\301!\210\306\307	\"\305\302!\210\310\n\311\"\305\303!\210\310\312\"\313\314\315\316\211$\210\313\317\320\321\316$\210\322\211\f>\262\205C\313\323\324\321\316$\210\313\323\325\321\316$\207" [eshell-modify-global-environment process-environment eshell-special-chars-inside-quoting eshell-special-chars-outside-quoting eshell-modules-list make-local-variable mapcar concat 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] 5 (#$ . 6587)])
#@50 Allow for the syntax `VAR=val <command> <args>'.
(defalias 'eshell-handle-local-variables #[0 "\204	\203	@	A\202\302!	\205g\303\304\"\205g\305\306\307\310\311C\312C\303\304	\"\203W\211\313\314\315\"\314\316\f\"\314\316
\"G\317UFC\244\210\302@!\262A\262\202(\211A\262\320\321	DEC#D\"\207" [eshell-last-command-name eshell-last-arguments eshell-stringify string-match "\\`\\([A-Za-z_][A-Za-z0-9_]*\\)=\\(.*\\)\\'" throw eshell-replace-command eshell-as-subcommand append progn t setenv match-string 1 2 0 eshell-named-command quote] 15 (#$ . 7326)])
#@103 Parse a variable interpolation.
This function is explicit for adding to `eshell-parse-argument-hook'.
(defalias 'eshell-interpolate-variable #[0 "\300f\301=\205`TdU?\205\300u\210\302\303 D\207" [nil 36 eshell-escape-arg eshell-parse-variable] 2 (#$ . 7912)])
#@65 Define a VAR-ALIAS using DEFINITION.

(fn VAR-ALIAS DEFINITION)
(defalias 'eshell/define #[514 "\211\204\301\302\"\"\2026\302\"\303G\304U\203!@\202\"DD\2030\301\302\"\"\211B\266\305\207" [eshell-variable-aliases-list delq assoc quote 1 nil] 8 (#$ . 8181)])
#@86 This alias allows the `export' command to act as bash users expect.

(fn &rest SETS)
(defalias 'eshell/export #[128 "\211\205&\211@;\203\300\301@\"\203\302\303\304@\"\303\305@\"\"\210\211A\262\202\207" [string-match "^\\([^=]+\\)=\\(.*\\)" setenv match-string 1 2] 6 (#$ . 8468)])
#@44 Completion function for Eshell's `export'.
(defalias 'pcomplete/eshell-mode/export #[0 "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[0 "\203	\207\302 \207" [eshell-complete-export-definition process-environment eshell-envvar-names] 1] nil] 5 (#$ . 8766)])
#@49 Unset an environment variable.

(fn &rest ARGS)
(defalias 'eshell/unset #[128 "\211\205\211@;\203\300@\301\302#\210\211A\262\202\207" [setenv nil t] 5 (#$ . 9045)])
#@43 Completion function for Eshell's `unset'.
(defalias 'pcomplete/eshell-mode/unset #[0 "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[0 "\300 \207" [eshell-envvar-names] 1] nil] 5 (#$ . 9224)])
#@51 Allow command-ish use of `setq'.

(fn &rest ARGS)
(defalias 'eshell/setq #[128 "\300\203\301@!A@L\262AA\262\266\202\207" [nil intern] 6 (#$ . 9435)])
#@42 Completion function for Eshell's `setq'.
(defalias 'pcomplete/eshell-mode/setq #[0 "\300\301\302\211\211$\205\300\303\302\211\211$\205\202\207" [pcomplete--here #[0 "\302	\303#\207" [pcomplete-stub obarray all-completions boundp] 4] nil #[0 "\300\207" [nil] 1]] 5 (#$ . 9604)])
#@51 Implementation of `env' in Lisp.

(fn &rest ARGS)
(defalias 'eshell/env #[128 "\300 \210\301!\302\303\"\262\304\305\306#\307\310 \311\"\211\203(\211@\312\313\"\210A\266\202\202\210\314 \207" [eshell-init-print-buffer flatten-tree mapcar eshell-stringify eshell--do-opts "env" ((104 "help" nil nil "show this usage screen") :external "env" :usage "<no arguments>") sort eshell-environment-variables string-lessp eshell-buffered-print "\n" eshell-flush] 8 (#$ . 9895)])
#@72 Insert ENVVAR-NAME into the current buffer at point.

(fn ENVVAR-NAME)
(defalias 'eshell-insert-envvar #[257 "\300\301\"\207" [insert-and-inherit "$"] 4 (#$ . 10378) (byte-code "\300\301\302\"C\207" [read-envvar-name "Name of environment variable: " t] 3)])
#@92 Return a list of currently visible environment variable names.

(fn &optional ENVIRONMENT)
(defalias 'eshell-envvar-names #[256 "\301\302\206\"\207" [process-environment mapcar #[257 "\211\300\301\302\"O\207" [0 string-search "="] 6 "\n\n(fn X)"]] 4 (#$ . 10643)])
#@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 #[0 "\302\303\"	\211\203(\211@\3048\203!\305@\306\307@!\206\310!\"\210A\266\202\202\210)\207" [process-environment eshell-variable-aliases-list mapcar concat 2 setenv eshell-stringify eshell-get-variable ""] 7 (#$ . 10920)])
#@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 #[0 "\300f\301=\205\300u\210\302\300\211\303 \262m?\205\300f\304=\205\305 \262\306\307\310DDCE\262\2034\311D\207\207" [nil 35 t eshell-parse-variable-ref 91 eshell-parse-indices let indices quote length] 7 (#$ . 11373)])
#@479 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
  'LONG-NAME'   as above
  {COMMAND}     result of command is variable's value
  (LISP-FORM)   result of Lisp form is variable's value
  <COMMAND>     write the output of command to a temporary file;
                result is the file name
(defalias 'eshell-parse-variable-ref #[0 "\303f\304=\203%\305\304\306\"\211\204\307\310\304\"\207\311\312\313\314`TB!DDDTb\210\207\303f\315>\203F\303f\316=\2038\317 \202:\320 \211\205E\321\322!\323BB\207\303f\324=\203\216\305\324\325\"\211\204Z\307\310\324\"\207\326!`T{\327Q\330\331\332\333BBDC\334\313\314!D\335\336\337\340\341\342\303\343
DEDDED\344DFETb\210\207\303f\345=\203\252\3461\244\312\347\344\350p!DDD0\207\210\307\310\345\"\207\351\352\303f!	\"\203\301\303u\210\321\352`Sf!\353BB\207\354\n!\203\323\321\355\356!\357BB\356\225b\210\207\360\361!\207" [temporary-file-directory eshell-variable-aliases-list eshell-variable-name-regexp 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 ('overwrite) progn ignore nconc eshell-this-command-hook list function lambda delete-file quote 40 (end-of-file) eshell-lisp-command read assoc char-to-string (indices) looking-at match-string 0 (indices) error "Invalid variable reference"] 16 (#$ . 11981)])
#@45 Parse and return a list of list of indices.
(defalias 'eshell-parse-indices #[0 "\301\301f\302=\203/\303\302\304\"\211\204\305\306\302\"\266\202\301u\210\301\307`\"B\262)\211Tb\266\202\211\237\207" [eshell-glob-function nil 91 eshell-find-delimiter 93 throw eshell-incomplete eshell-parse-arguments] 5 (#$ . 13708)])
#@67 Get the value for the variable NAME.

(fn NAME &optional INDICES)
(defalias 'eshell-get-variable #[513 "\303\"\211\203\211A@\202\203\304!\203\211!\207\305;\203M\306!\211\203E\307!\203E	\204@\211\n>\204@\310!\204E\211J\202H\310!\262\202]9\203WJ\202]\311\312\313!\"\"\207" [eshell-variable-aliases-list eshell-prefer-lisp-variables eshell--local-vars assoc functionp eshell-apply-indices intern-soft boundp getenv error "Unknown variable `%s'" eshell-stringify] 9 (#$ . 14044)])
#@747 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:

  ${grep johnw /etc/passwd}[: 2]

(fn VALUE INDICES)
(defalias 'eshell-apply-indices #[514 "\211\203z\211@;\2033\301@@;\203(\302\303\304Q@@\"\204(@@\262A\262\305\306\307\"\"\262\210\211G\310W\203E\311\312\313!\"\266\202s\211G\314U\203W\315@\"\262\210\202s\316C\203m\211\315@\"C\244\210A\262\202Y\211A\262\266\211A\262\202\207" [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] 9 (#$ . 14562)])
#@58 Reference VALUE using the given INDEX.

(fn VALUE INDEX)
(defalias 'eshell-index-value #[514 "\211;\203\300\301\302#\203\303!\262\211;\203\304\"A\207\305!\2034\211\306!V\203/\307\310!\207\311\"\207<\203H\211GV\203D\307\312!\207\2118\207\313!\203]\211GV\203Y\307\314!\207H\207\307\315!\207" [get-text-property 0 number string-to-number 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"] 6 (#$ . 15816)])
#@48 If there is a variable reference, complete it.
(defalias 'eshell-complete-variable-reference #[0 "\302\211\303\"`{\266\202\302\304\305\306Q\"\211\262\205#T\302O\307\310\311 \"\207" [eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\$\\(" "\\)?\\'" throw pcomplete-completions eshell-variables-list] 6 (#$ . 16379)])
#@40 Generate list of applicable variables.
(defalias 'eshell-variables-list #[0 "\303	\211\203 \211@\304\305P@\"\203\211@B\262A\266\202\202\210\306\307\310\311\312\313 !\"\314\n\315##\316\"\207" [pcomplete-stub eshell-variable-aliases-list obarray nil string-match "^" sort append mapcar #[257 "\300!\211\203\211;\203\301!\203\302P\207\207" [eshell-get-variable file-directory-p "/"] 4 "\n\n(fn VARNAME)"] eshell-envvar-names eshell-environment-variables all-completions boundp string-lessp] 9 (#$ . 16739)])
#@65 If there is a variable assignment, allow completion of entries.
(defalias 'eshell-complete-variable-assignment #[0 "\302\211\303\"`{\266\202\302\304\305\306Q\"\205.\307\225\262\304\310\"\203$\311\225\262\302O\312\313\314 \"\207" [eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\`" "=" 0 "\\(:\\)[^:]*\\'" 1 throw pcomplete-completions pcomplete-entries] 6 (#$ . 17273)])
(provide 'esh-var)

Youez - 2016 - github.com/yon3zu
LinuXploit