%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/eshell/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/eshell/em-dirs.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\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312\313\314&\210\315\316\317\320\321DD\322\323\324\325\326&\210\315\327\317\320\330DD\331\325\332%\210\315\333\317\320\334DD\335\325\336%\210\315\337\317\320\340DD\341\325\342%\210\315\343\317\320\344DD\345\325\342%\210\315\346\317\320\347DD\350\325\326%\210\315\351\317\320\352DD\353\325\342%\210\315\354\317\320\355DD\356\325\342%\210\315\357\317\320\360DD\361\325\342%\210\315\362\317\320\363DD\364\325\342%\210\315\365\317\320\366DD\367\325\342%\210\315\370\317\320\371DD\372\325\373%\210\315\374\317\320\375DD\376\325\377%\210\315\201@\317\320\201ADD\201B\325\342%\207" [require esh-mode esh-var ring esh-opt custom-declare-group eshell-dirs nil "Directory navigation involves changing directories, examining the\ncurrent directory, maintaining a directory stack, and also keeping\ntrack of a history of the last directory locations the user was in.\nEmacs does provide standard Lisp definitions of `pwd' and `cd', but\nthey lack somewhat in feel from the typical shell equivalents." :tag "Directory navigation" :group eshell-module custom-declare-variable eshell-dirs-load-hook funcall function #[0 "\300\207" [nil] 1] "A hook that gets run when `eshell-dirs' is loaded." :version "24.1" :type hook eshell-pwd-convert-function #[0 "\301>\203\302\207\303\207" [system-type (ms-dos windows-nt) expand-file-name identity] 2] "The function used to normalize the value of Eshell's `pwd'.\nThe value returned by `pwd' is also used when recording the\nlast-visited directory in the last-dir-ring, so it will affect the\nform of the list used by `cd ='." (radio (function-item file-truename) (function-item expand-file-name) (function-item identity) (function :tag "Other")) eshell-ask-to-save-last-dir #[0 "\300\207" [always] 1] "Determine if the last-dir-ring should be automatically saved.\nThe last-dir-ring is always preserved when exiting an Eshell buffer.\nHowever, when Emacs is being shut down, this variable determines\nwhether to prompt the user, or just save the ring.\nIf set to nil, it means never ask whether to save the last-dir-ring.\nIf set to t, always ask if any Eshell buffers are open at exit time.\nIf set to `always', the list-dir-ring will always be saved, silently." (choice (const :tag "Never" nil) (const :tag "Ask" t) (const :tag "Always save" always)) eshell-cd-shows-directory #[0 "\300\207" [nil] 1] "If non-nil, using `cd' will report the directory it changes to." boolean eshell-cd-on-directory #[0 "\300\207" [t] 1] "If non-nil, do a cd if a directory is in command position." eshell-directory-change-hook #[0 "\300\207" [nil] 1] "A hook to run when the current directory changes." eshell-list-files-after-cd #[0 "\300\207" [nil] 1] "If non-nil, call \"ls\" with any remaining args after doing a cd.\nThis is provided for convenience, since the same effect is easily\nachieved by adding a function to `eshell-directory-change-hook' that\ncalls \"ls\" and references `eshell-last-arguments'." eshell-pushd-tohome #[0 "\300\207" [nil] 1] "If non-nil, make pushd with no arg behave as `pushd ~' (like `cd').\nThis mirrors the optional behavior of tcsh." eshell-pushd-dextract #[0 "\300\207" [nil] 1] "If non-nil, make \"pushd +n\" pop the nth dir to the stack top.\nThis mirrors the optional behavior of tcsh." eshell-pushd-dunique #[0 "\300\207" [nil] 1] "If non-nil, make pushd only add unique directories to the stack.\nThis mirrors the optional behavior of tcsh." eshell-dirtrack-verbose #[0 "\300\207" [t] 1] "If non-nil, show the directory stack following directory change.\nThis is effective only if directory tracking is enabled." eshell-last-dir-ring-file-name #[0 "\301\302\"\207" [eshell-directory-name expand-file-name "lastdir"] 3] "If non-nil, name of the file to read/write the last-dir-ring.\nSee also `eshell-read-last-dir-ring' and `eshell-write-last-dir-ring'.\nIf it is nil, the last-dir-ring will not be written to disk." file eshell-last-dir-ring-size #[0 "\300\207" [32] 1] "If non-nil, the size of the directory history ring.\nThis ring is added to every time `cd' or `pushd' is used.  It simply\nstores the most recent directory locations Eshell has been in.  To\nreturn to the most recent entry, use `cd -' (equivalent to `cd -0').\nTo return to an older entry, use `cd -N', where N is an integer less\nthan `eshell-last-dir-ring-size'.  To return to the last directory\nmatching a particular regexp, use `cd =REGEXP'.  To display the\ndirectory history list, use `cd ='.\n\nThis mechanism is very similar to that provided by `pushd', except\nit's far more automatic.  `pushd' allows the user to decide which\ndirectories gets pushed, and its size is unlimited.\n\n`eshell-last-dir-ring' is meant for users who don't use `pushd'\nexplicitly very much, but every once in a while would like to return to\na previously visited directory without having to type in the whole\nthing again." integer eshell-last-dir-unique #[0 "\300\207" [t] 1] "If non-nil, `eshell-last-dir-ring' contains only unique entries."] 8)
#@109 List of directories saved by pushd in the Eshell buffer.
Thus, this does not include the current directory.
(defvar eshell-dirstack nil (#$ . 5468))
#@40 The last directory that Eshell was in.
(defvar eshell-last-dir-ring nil (#$ . 5623))
#@46 Initialize the builtin functions for Eshell.
(defalias 'eshell-dirs-initialize #[0 "\306\300!\210\307\310\311D\312\313\314\315BB\316\317\320BBF\"	\203%\306\302!\210\321\322B\nB\323\324\325\326\327$\210\330>\2039\323\324\331\326\327$\210\332\211\f>\262\203I\323\333\334\326\327$\210\306\335!\210\306\336!\210
\203X\337 \210\204c\340%!\323\341\342\326\327$\210\323\343\344\"\207" [eshell-variable-aliases-list eshell-cd-on-directory eshell-interpreter-alist system-type eshell-modules-list eshell-last-dir-ring-file-name make-local-variable append "-" #[257 "\211\204\301!?\205\302\303\304\"!\207\302\305\"!\207" [eshell-last-dir-ring ring-empty-p expand-file-name ring-ref 0 eshell-apply-indices] 5 "\n\n(fn INDICES)"] ("+" "PWD") "PWD" #[257 "\300\301 !\207" [expand-file-name eshell/pwd] 3 "\n\n(fn INDICES)"] (t) "OLDPWD" #[257 "\301!?\205
\302\303\304\"!\207" [eshell-last-dir-ring ring-empty-p expand-file-name ring-ref 0] 5 "\n\n(fn INDICES)"] (t) #[514 "\300!\207" [eshell-lone-directory-p] 4 "\n\n(fn FILE ARGS)"] eshell-dirs-substitute-cd add-hook eshell-parse-argument-hook eshell-parse-user-reference nil t (ms-dos windows-nt) eshell-parse-drive-letter eshell-cmpl pcomplete-try-first-hook eshell-complete-user-reference eshell-dirstack eshell-last-dir-ring eshell-read-last-dir-ring make-ring eshell-exit-hook eshell-write-last-dir-ring kill-emacs-hook eshell-save-some-last-dir eshell-last-dir-ring-size] 8 (#$ . 5714)])
#@53 Save the list-dir-ring for any open Eshell buffers.
(defalias 'eshell-save-some-last-dir #[0 "\302 \211\2056\211@\303!\203/r\211q\210\203.	\203.	\304=\204+\305\306\307\310!\"!\203.\311 \210)A\266\202\202\207" [eshell-mode eshell-ask-to-save-last-dir buffer-list buffer-live-p always y-or-n-p format-message "Save last dir ring for Eshell buffer `%s'? " buffer-name eshell-write-last-dir-ring] 7 (#$ . 7180)])
#@80 Test whether FILE is just a directory name, and not a command name.

(fn FILE)
(defalias 'eshell-lone-directory-p #[257 "\300!\205\301!\206\302!?\207" [file-directory-p file-name-directory eshell-search-path] 3 (#$ . 7607)])
#@80 Substitute the given command for a call to `cd' on that name.

(fn &rest ARGS)
(defalias 'eshell-dirs-substitute-cd #[128 "\211G\300V\203
\301\302@\"\207\303\304\305\306\307!\"\"\207" [1 error "%s: command not found" throw eshell-replace-command eshell-parse-command "cd" flatten-tree] 7 (#$ . 7845)])
#@60 An argument beginning with ~ is a filename to be expanded.
(defalias 'eshell-parse-user-reference #[0 "?\205\301f\302=\205\303\304\305\"\210\301u\210\306`Sf!\207" [eshell-current-argument nil 126 add-to-list eshell-current-modifiers expand-file-name char-to-string] 3 (#$ . 8156)])
#@64 An argument beginning with X:[^/] is a drive letter reference.
(defalias 'eshell-parse-drive-letter #[0 "?\205!\301\302!\205!\303\225b\210\304\303!\305P\306!\211\206\307P\266\203\207" [eshell-current-argument looking-at "\\([A-Za-z]:\\)\\([^/\\]\\|\\'\\)" 1 match-string "\\`" eshell-find-previous-directory "/"] 5 (#$ . 8449)])
#@44 If there is a user reference, complete it.
(defalias 'eshell-complete-user-reference #[0 "\303 \304\305\"\205\306\307\"\310\311\312\313 \210\314\315\316\n\"!\"\207" [pcomplete-stub pcomplete-last-completion-raw eshell-user-names pcomplete-actual-arg string-match "\\`~[a-z]*\\'" substring 1 t throw pcomplete-completions eshell-read-user-names pcomplete-uniquify-list mapcar #[257 "\300A!\207" [file-name-as-directory] 3 "\n\n(fn USER)"]] 7 (#$ . 8792)])
#@58 Change output from `pwd' to be cleaner.

(fn &rest ARGS)
(defalias 'eshell/pwd #[128 "\211G\211\303V\203(SH\304=\203(	\305>\203\306\307\"\204(\310\311GS#\262\n\206-\312!\207" [default-directory system-type eshell-pwd-convert-function 1 47 (ms-dos windows-nt) string-match "\\`[A-Za-z]:[\\/]\\'" substring 0 identity] 7 (#$ . 9260)])
#@432 Convert `...' to `../..', `....' to `../../..', etc..

With the following piece of advice, you can make this functionality
available in most of Emacs, with the exception of filename completion
in the minibuffer:

    (advice-add 'expand-file-name :around #'my-expand-multiple-dots)
    (defun my-expand-multiple-dots (orig-fun filename &rest args)
      (apply orig-fun (eshell-expand-multiple-dots filename) args))

(fn FILENAME)
(defalias 'eshell-expand-multiple-dots #[257 "\300\301\"\203-\302\303\"\211G\304\305V\203 \211\306P\262S\262\202\307\310\211\303%\266\204\202\207" [string-match "\\(?:\\`\\|/\\)\\.\\.\\(\\.+\\)\\(?:\\'\\|/\\)" match-string 1 nil 0 "/.." replace-match t] 10 (#$ . 9614)])
#@61 Find the most recent last-dir matching REGEXP.

(fn REGEXP)
(defalias 'eshell-find-previous-directory #[257 "\301\302!\303G\301V\203/W\203/\304\"\262\305\"\203%\262\202\f\303\262T\262\202\f\207" [eshell-last-dir-ring 0 ring-length nil ring-ref string-match] 7 (#$ . 10337)])
#@56 Alias to extend the behavior of `cd'.

(fn &rest ARGS)
(defalias 'eshell/cd #[128 "\306!\262\211@A@\307>\310\247\203\311!\262\247\203$\311!\262\203F\312 \313\"\203<\314\310\211$\262\202B\315\316\"\210\210\202\305\203i\313\317\"\203i\320\321\"\322\n\203a\323!\202b\324\"\262\210\202\305\203\274\313\325\"\203\274\326\320\321\"!\211\203\205\211\262\202\270\327\n!\324\324U\203\223\315\330!\210\331 \210\211W\203\260\332\311!\333\334\n\"\335R!\210\211T\262\202\226\336 \210\337\262\266\210\202\305\203\305\340!\262\211?\205\312 \206\321\341\232\204\333\342!\210\343!\203\361\211\211\344\f\"\266\335\344\f\"\266\210\345\346!\210
\203\347\350A\"\210\310\266\202)\207" [system-type case-fold-search eshell-last-dir-ring eshell-cd-shows-directory eshell-output-handle eshell-list-files-after-cd flatten-tree (ms-dos windows-nt) nil number-to-string eshell/pwd string-match replace-match error "Path substring `%s' not found" "^-\\([0-9]*\\)$" match-string 1 ring-remove string-to-number 0 "^=\\(.*\\)$" eshell-find-previous-directory ring-length "Directory ring empty" eshell-init-print-buffer eshell-buffered-print ": " ring-ref "\n" eshell-flush t eshell-expand-multiple-dots "~" eshell-add-to-dir-ring cd eshell-output-object run-hooks eshell-directory-change-hook eshell-plain-command "ls"] 14 (#$ . 10637)])
(byte-code "\300\301\302\303#\210\300\301\304\303#\207" [put eshell/cd eshell-no-numeric-conversions t eshell-filename-arguments] 4)
#@58 Add PATH to the last-dir-ring, if applicable.

(fn PATH)
(defalias 'eshell-add-to-dir-ring #[257 "\302!?\205
\211\303\304\"\232?\205=	\2039\304\305!W\2037\303\"\232\2030\306\"\210\202T\262\202\266\307\"\207" [eshell-last-dir-ring eshell-last-dir-unique ring-empty-p ring-ref 0 ring-length ring-remove ring-insert] 6 (#$ . 12163)])
#@51 Implementation of pushd in Lisp.

(fn &rest ARGS)
(defalias 'eshell/pushd #[128 "\211@\211\2040\203\304\305!\210\202\265	\203)\306 \307	@!\210\211	AB\310\311!\266\202\265\312\313!\210\202\265\314\315\"\203\234\316\317\320\"!\262\211	GV\203M\312\321!\210\202\265\211\322U\203Z\312\323!\210\202\265\n\203w\211S	8\324!\210\304\306 !\210\307!\210\310\311!\266\202\265\306 	B\211G\233Z\325!\233\237\326\"\307@!\210\211A\310\311!\266\202\265\306 \307!\210\203\254\211	\235\204\260\211	B\310\311!\266\210\327\207" [eshell-pushd-tohome eshell-dirstack eshell-pushd-dextract eshell-pushd-dunique eshell/pushd "~" eshell/pwd eshell/cd eshell/dirs t error "pushd: No other directory" string-match "^\\+\\([0-9]\\)" string-to-number match-string 1 "Directory stack not that deep" 0 "Couldn't cd" eshell/popd reverse append nil] 9 (#$ . 12524)])
(byte-code "\300\301\302\303#\210\300\301\304\303#\207" [put eshell/pushd eshell-no-numeric-conversions t eshell-filename-arguments] 4)
#@50 Implementation of popd in Lisp.

(fn &rest ARGS)
(defalias 'eshell/popd #[128 "\211@\206\301\211;\203\302\303\"\204\304\305\"\210\306\307\310\"!\262\211\311U\203<\204-\304\312!\210\313@!\210A\314\315!\210\202u\316!GX\203q\317B\311V\203SS\202WG\\\233\211A@\313!\210\211AA\241\210A\314\315!\266\202u\304\320!\210\210\317\207" [eshell-dirstack "+0" string-match "\\`\\([+-][0-9]+\\)\\'" error "popd: bad arg `%s'" string-to-number match-string 1 0 "popd: Directory stack empty" eshell/cd eshell/dirs t abs nil "Couldn't popd"] 7 (#$ . 13539)])
(byte-code "\300\301\302\303#\210\300\304\305\303#\207" [put eshell/popd eshell-no-numeric-conversions t eshell/pop eshell-filename-arguments] 4)
#@60 Implementation of dirs in Lisp.

(fn &optional IF-VERBOSE)
(defalias 'eshell/dirs #[256 "\211\203\205D\302\303 	B\304\305!\211G\203A@\211GY\2031\306\307#\230\2031\305\306\"P\262\310!\311Q\262A\262\210\202\266\204\207" [eshell-dirtrack-verbose eshell-dirstack "" eshell/pwd expand-file-name "~/" substring 0 directory-file-name " "] 11 (#$ . 14266)])
#@62 Set the buffer's `eshell-last-dir-ring' from a history file.
(defalias 'eshell-read-last-dir-ring #[0 "\211\203\211\303\232\204\304!\204\305\202o\306	\307!\310\311!r\211q\210\312\306\313\314\315!\316\"\317$\216\320!\210db\210W\203P\321\322\305\323#\203P\324\325\326!\"\210T\262\2024\327!\204h\330\306\"\331 \232\203h\332\306\"\210\202P*\210\211\211\266\203\207" [eshell-last-dir-ring-file-name eshell-last-dir-ring-size eshell-last-dir-ring "" file-readable-p nil 0 make-ring generate-new-buffer " *temp*" make-byte-code "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents re-search-backward "^\\([^\n].*\\)$" t ring-insert-at-beginning match-string 1 ring-empty-p ring-ref eshell/pwd ring-remove] 11 (#$ . 14646)])
#@62 Write the buffer's `eshell-last-dir-ring' to a history file.
(defalias 'eshell-write-last-dir-ring #[0 "\211;\205	\302!\203\303\232\204	\203\304	!\203!\305\202\202\306!\204.\307\310\"\202\202	\311!\312\313!r\211q\210\314\315\316\317\320!\321\"\322$\216\315V\203ZS\262\323\"\324\261\210\202E\325 \324\261\210\326 \314\315\327\317\320!\330\"\322$\216\331\332!\210\333ed\305\334%)\262*\262\266\202\207" [eshell-last-dir-ring-file-name eshell-last-dir-ring file-truename "" ring-empty-p nil file-writable-p message "Cannot write last-dir-ring file %s" ring-length generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 ring-ref 10 eshell/pwd default-file-modes "\301\300!\207" [set-default-file-modes] set-default-file-modes 384 write-region no-message] 12 (#$ . 15438)])
(provide 'em-dirs)

Zerion Mini Shell 1.0