%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/eshell/ |
Current File : //usr/local/share/emacs/27.2/lisp/eshell/em-alias.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\304\305\306\307\310\311&\210\312\313\314\315\316DD\317\320\321\310\303&\210\312\322\314\315\323DD\324\320\325\310\303&\210\312\326\314\315\327DD\330\331\332\320\333\310\303& \207" [require esh-mode custom-declare-group eshell-alias nil "Command aliases allow for easy definition of alternate commands." :tag "Command aliases" :group eshell-module custom-declare-variable eshell-aliases-file funcall function #[0 "\301\302\"\207" [eshell-directory-name expand-file-name "alias"] 3] "The file in which aliases are kept.\nWhenever an alias is defined by the user, using the `alias' command,\nit will be written to this file. Thus, alias definitions (and\ndeletions) are always permanent. This approach was chosen for the\nsake of simplicity, since that's pretty much the only benefit to be\ngained by using this module." :type file eshell-bad-command-tolerance #[0 "\300\207" [3] 1] "The number of failed commands to ignore before creating an alias." integer eshell-alias-load-hook #[0 "\300\207" [nil] 1] "A hook that gets run when `eshell-alias' is loaded." :version "24.1" hook] 10) #@465 A list of command aliases currently defined by the user. Each element of this alias is a list of the form: (NAME DEFINITION) Where NAME is the textual name of the alias, and DEFINITION is the command string to replace that command with. Note: this list should not be modified in your init file. Rather, any desired alias definitions should be declared using the `alias' command, which will automatically write them to the file named by `eshell-aliases-file'. (defvar eshell-command-aliases-list nil (#$ . 1532)) (put 'eshell-command-aliases-list 'risky-local-variable t) #@36 An alist of command name failures. (defvar eshell-failed-commands-alist nil (#$ . 2114)) #@37 Initialize the alias handling code. (defalias 'eshell-alias-initialize #[0 "\300\301!\210\302\303\304\305\211$\210\306 \210\302\307\310\305\211$\210\300\311!\210\312\311\313\"\207" [make-local-variable eshell-failed-commands-alist add-hook eshell-alternate-command-hook eshell-fix-bad-commands t eshell-read-aliases-list eshell-named-command-hook eshell-maybe-replace-by-alias eshell-complex-commands add-to-list eshell-command-aliased-p] 5 (#$ . 2209)]) #@13 (fn NAME) (defalias 'eshell-command-aliased-p #[257 "\301\"\207" [eshell-command-aliases-list assoc] 4 (#$ . 2670)]) #@99 Define an ALIAS in the user's alias list using DEFINITION. (fn &optional ALIAS &rest DEFINITION) (defalias 'eshell/alias #[384 "\204! \211\203 \211@\302\303\304#\305 \"\266A\266\202\202 \210\202` \211\2040 \306\307\"\"\202] \211;\203= \310\311G\312$\210\307\"C\313\314\315!\316#\262D\203W \306\"\211B\266\317 \210\312\207" [eshell-command-aliases-list eshell-output-handle apply format "alias %s %s\n" eshell-output-object delq assoc set-text-properties 0 nil mapconcat eshell-stringify flatten-tree " " eshell-write-aliases-list] 9 (#$ . 2797)]) (autoload 'pcomplete-here "pcomplete") #@51 Completion function for Eshell's `alias' command. (defalias 'pcomplete/eshell-mode/alias #[0 "\300\301\302\211\211$\207" [pcomplete--here #[0 "\301!\207" [pcomplete-stub eshell-alias-completions] 2] nil] 5 (#$ . 3417)]) #@53 Read in an aliases list from `eshell-aliases-file'. (defalias 'eshell-read-aliases-list #[0 "\302!\205@ \303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216\314\315!\210m\204: \316\317!\2034 \320\321!\320\313!D B\321y\210\202 +\262\211\207" [eshell-aliases-file eshell-command-aliases-list file-readable-p generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 nil insert-file-contents re-search-forward "^alias\\s-+\\(\\S-+\\)\\s-+\\(.+\\)" match-string 1] 8 (#$ . 3644)]) #@59 Write out the current aliases into `eshell-aliases-file'. (defalias 'eshell-write-aliases-list #[0 "\302\303!!\205 \304\305\"\306 \210\307\310!)\207" [eshell-aliases-file eshell-current-handles file-writable-p file-name-directory eshell-create-handles overwrite eshell/alias eshell-close-handles 0] 3 (#$ . 4203)]) #@78 Check whether NAME is aliased. Return the alias if there is one. (fn NAME) (defalias 'eshell-lookup-alias #[257 "\301\"\207" [eshell-command-aliases-list assoc] 4 (#$ . 4528)]) (put 'eshell-lookup-alias 'byte-optimizer 'byte-compile-inline-expand) (defvar eshell-prevent-alias-expansion nil) #@67 Call COMMAND's alias definition, if it exists. (fn COMMAND ARGS) (defalias 'eshell-maybe-replace-by-alias #[514 "\205 \235?\2055 \304 \"\262\211\2053 \305\306\307\310\311\nDD\312\311DD\300\311 BDDE\313A@!E\"\262\207" [eshell-prevent-alias-expansion eshell-command-aliases-list eshell-last-command-name eshell-last-arguments assoc throw eshell-replace-command let eshell-command-name quote eshell-command-arguments eshell-parse-command] 12 (#$ . 4830)]) #@109 Find all possible completions for NAME. These are all the command aliases which begin with NAME. (fn NAME) (defalias 'eshell-alias-completions #[257 "\301\211\203 \211@\302\303P@\"\203 \211@B\262A\266\202\202 \210\211\207" [eshell-command-aliases-list nil string-match "^"] 7 (#$ . 5303)]) #@79 If the user repeatedly a bad command NAME, make an alias for them. (fn NAME) (defalias 'eshell-fix-bad-commands #[257 "\304\305!\204T \306\"\211\204 \307BB\202S \211A W\203( \211AT\241\210\202S \310\311\312\"!\313P\314\"\210\315\316\317\320\321DD\322\321\nDD\303\321\nBDDE\323!E\"\266\210\207" [eshell-failed-commands-alist eshell-bad-command-tolerance eshell-last-arguments eshell-prevent-alias-expansion nil file-name-directory assoc 1 read-string format "Define alias for \"%s\": " " $*" eshell/alias throw eshell-replace-command let eshell-command-name quote eshell-command-arguments eshell-parse-command] 13 (#$ . 5609)]) (provide 'em-alias)