;ELC   
;;; Compiled by handa@melange.gnu.org on Tue Jun 30 04:04:41 1998
;;; from file /fs/gd/1/gnu/emacs/lisp/shell.el
;;; in Emacs version 20.2.97.1
;;; with bytecomp version 2.47
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`shell.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\301\302!\210\303\304\305\306\307\310&\210\303\311\305\312\304%\210\303\313\305\314\304%\207" [:group require comint custom-declare-group shell nil "Running shell from within Emacs buffers" processes unix shell-directories "Directory support in shell mode" shell-faces "Faces in shell buffers"] 8)
#@426 Regexp to match prompts in the inferior shell.
Defaults to "^[^#$%>\n]*[#$%>] *", which works pretty well.
This variable is used to initialise `comint-prompt-regexp' in the 
shell buffer.

The pattern should probably not match more than one line.  If it does,
Shell mode may become confused trying to distinguish prompt from input
on lines which don't start with a prompt.

This is a fine thing to set in your `.emacs' file.
(defvar shell-prompt-pattern "^[^#$%>\n]*[#$%>] *" (#$ . 917))
#@295 *List of suffixes to be disregarded during file/command completion.
This variable is used to initialize `comint-completion-fignore' in the shell
buffer.  The default is nil, for compatibility with most shells.
Some people like ("~" "#" "%").

This is a fine thing to set in your `.emacs' file.
(custom-declare-variable 'shell-completion-fignore 'nil '(#$ . -1412) :type '(repeat (string :tag "Suffix")) :group 'shell)
#@254 List of characters to recognise as separate arguments.
This variable is used to initialize `comint-delimiter-argument-list' in the
shell buffer.  The value may depend on the operating system or shell.

This is a fine thing to set in your `.emacs' file.
(defvar shell-delimiter-argument-list '(124 38 60 62 40 41 59) (#$ . 1837))
#@234 String of characters valid in a file name.
This variable is used to initialize `comint-file-name-chars' in the
shell buffer.  The value may depend on the operating system or shell.

This is a fine thing to set in your `.emacs' file.
(defvar shell-file-name-chars (byte-code "\301>\203 \302\207\303\207" [system-type (ms-dos windows-nt) "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" "~/A-Za-z0-9+@:_.$#%,={}-"] 2) (#$ . 2173))
#@245 List of characters to quote when in a file name.
This variable is used to initialize `comint-file-name-quote-list' in the
shell buffer.  The value may depend on the operating system or shell.

This is a fine thing to set in your `.emacs' file.
(defvar shell-file-name-quote-list (byte-code "\302>?\205 \303	\304\"\207" [system-type shell-delimiter-argument-list (ms-dos windows-nt) append (32 42 33 34 39 96)] 3) (#$ . 2594))
#@194 List of functions called to perform completion.
This variable is used to initialise `comint-dynamic-complete-functions' in the
shell buffer.

This is a fine thing to set in your `.emacs' file.
(defvar shell-dynamic-complete-functions '(comint-replace-by-expanded-history shell-dynamic-complete-environment-variable shell-dynamic-complete-command shell-replace-by-expanded-directory comint-dynamic-complete-filename) (#$ . 3029))
#@121 *Regexp to match a single command within a pipeline.
This is used for directory tracking and does not do a perfect job.
(custom-declare-variable 'shell-command-regexp '"[^;&|\n]+" '(#$ . -3465) :type 'regexp :group 'shell)
#@187 *If non-nil, use executable files only for completion candidates.
This mirrors the optional behavior of tcsh.

Detecting executability of files may slow command completion considerably.
(custom-declare-variable 'shell-completion-execonly 't '(#$ . -3695) :type 'boolean :group 'shell)
#@56 *Regexp to match subshell commands equivalent to popd.
(custom-declare-variable 'shell-popd-regexp '"popd" '(#$ . -3986) :type 'regexp :group 'shell-directories)
#@57 *Regexp to match subshell commands equivalent to pushd.
(custom-declare-variable 'shell-pushd-regexp '"pushd" '(#$ . -4154) :type 'regexp :group 'shell-directories)
#@112 *If non-nil, make pushd with no arg behave as "pushd ~" (like cd).
This mirrors the optional behavior of tcsh.
(custom-declare-variable 'shell-pushd-tohome 'nil '(#$ . -4326) :type 'boolean :group 'shell-directories)
#@108 *If non-nil, make "pushd +n" pop the nth dir to the stack top.
This mirrors the optional behavior of tcsh.
(custom-declare-variable 'shell-pushd-dextract 'nil '(#$ . -4550) :type 'boolean :group 'shell-directories)
#@111 *If non-nil, make pushd only add unique directories to the stack.
This mirrors the optional behavior of tcsh.
(custom-declare-variable 'shell-pushd-dunique 'nil '(#$ . -4772) :type 'boolean :group 'shell-directories)
#@54 *Regexp to match subshell commands equivalent to cd.
(custom-declare-variable 'shell-cd-regexp '"cd" '(#$ . -4995) :type 'regexp :group 'shell-directories)
#@53 *If non-nil, is regexp used to track drive changes.
(custom-declare-variable 'shell-chdrive-regexp '(if (memq system-type '(ms-dos windows-nt)) "[]a-zA-Z^_`\\[\\\\]:" nil) '(#$ . -5157) :type '(choice regexp (const nil)) :group 'shell-directories)
#@75 *If non-nil, is file name to use for explicitly requested inferior shell.
(custom-declare-variable 'explicit-shell-file-name 'nil '(#$ . -5411) :type '(choice (const :tag "None" nil) file) :group 'shell)
#@113 *Args passed to inferior shell by M-x shell, if the shell is csh.
Value is a list of strings, which may be nil.
(custom-declare-variable 'explicit-csh-args '(if (eq system-type 'hpux) '("-i" "-T") '("-i")) '(#$ . -5622) :type '(repeat (string :tag "Argument")) :group 'shell)
#@452 *If non-nil, expand input command history references on completion.
This mirrors the optional behavior of tcsh (its autoexpand and histlit).

If the value is `input', then the expansion is seen on input.
If the value is `history', then the expansion is only when inserting
into the buffer's input ring.  See also `comint-magic-space' and
`comint-dynamic-complete'.

This variable supplies a default for `comint-input-autoexpand',
for Shell mode only.
(custom-declare-variable 'shell-input-autoexpand ''history '(#$ . -5905) :type '(choice (const nil) (const input) (const history)) :type 'shell)
#@119 List of directories saved by pushd in this buffer's shell.
Thus, this does not include the shell's current directory.
(defvar shell-dirstack nil (#$ . 6508))
#@64 Non-nil in a shell buffer means directory tracking is enabled.
(defvar shell-dirtrackp t (#$ . 6672))
#@54 Keep track of last directory for ksh `cd -' command.
(defvar shell-last-dir nil (#$ . 6780))
#@56 Command used by `shell-resync-dir' to query the shell.
(defvar shell-dirstack-query nil (#$ . 6879))
(byte-code "\303\300!\204 \304\300	B\204L \305 \n\244\306\307\310#\210\306\311\312#\210\306\313\314#\210\306\315\316#\210\306\317\320\321\n\322\"!#\210\323\321\324\"\325\326\327$\210\323\321\330\"\331\332\333$\210\304\207" [shell-mode-map current-load-list comint-mode-map boundp nil make-sparse-keymap define-key "" shell-forward-command "" shell-backward-command "	" comint-dynamic-complete "\277" comint-dynamic-list-filename-completions [menu-bar completion] copy-keymap lookup-key [menu-bar completion] define-key-after [menu-bar completion] [complete-env-variable] ("Complete Env. Variable Name" . shell-dynamic-complete-environment-variable) complete-file [menu-bar completion] [expand-directory] ("Expand Directory Reference" . shell-replace-by-expanded-directory) complete-expand] 7)
#@35 *Hook for customising Shell mode.
(custom-declare-variable 'shell-mode-hook ''nil '(#$ . -7795) :type 'hook :group 'shell)
#@52 Additional expressions to highlight in Shell mode.
(defvar shell-font-lock-keywords '((eval cons shell-prompt-pattern 'font-lock-warning-face) ("[ 	]\\([+-][^ 	\n]+\\)" 1 font-lock-comment-face) ("^[^ 	\n]+:.*" . font-lock-string-face) ("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) (#$ . 7924))
(put 'shell-mode 'mode-class 'special)
#@2736 Major mode for interacting with an inferior shell.
\[comint-send-input] after the end of the process' output sends the text from
    the end of process to the end of the current line.
\[comint-send-input] before end of process output copies the current line minus the prompt to
    the end of the buffer and sends it (\[comint-copy-old-input] just copies the current line).
\[send-invisible] reads a line of text without echoing it, and sends it to
    the shell.  This is useful for entering passwords.  Or, add the function
    `comint-watch-for-password-prompt' to `comint-output-filter-functions'.

If you want to make multiple shell buffers, rename the `*shell*' buffer
using \[rename-buffer] or \[rename-uniquely] and start a new shell.

If you want to make shell buffers limited in length, add the function
`comint-truncate-buffer' to `comint-output-filter-functions'.

If you accidentally suspend your process, use \[comint-continue-subjob]
to continue it.

`cd', `pushd' and `popd' commands given to the shell are watched by Emacs to
keep this buffer's default directory the same as the shell's working directory.
While directory tracking is enabled, the shell's working directory is displayed
by \[list-buffers] or \[mouse-buffer-menu] in the `File' field.
\[dirs] queries the shell and resyncs Emacs' idea of what the current 
    directory stack is.
\[dirtrack-mode] turns directory tracking on and off.

\{shell-mode-map}
Customization: Entry to this mode runs the hooks on `comint-mode-hook' and
`shell-mode-hook' (in that order).  Before each input, the hooks on
`comint-input-filter-functions' are run.  After each shell output, the hooks
on `comint-output-filter-functions' are run.

Variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp' 
and `shell-popd-regexp' are used to match their respective commands, 
while `shell-pushd-tohome', `shell-pushd-dextract' and `shell-pushd-dunique' 
control the behavior of the relevant command.

Variables `comint-completion-autolist', `comint-completion-addsuffix',
`comint-completion-recexact' and `comint-completion-fignore' control the
behavior of file name, command name and variable name completion.  Variable
`shell-completion-execonly' controls the behavior of command name completion.
Variable `shell-completion-fignore' is used to initialise the value of
`comint-completion-fignore'.

Variables `comint-input-ring-file-name' and `comint-input-autoexpand' control
the initialisation of the input ring history, and history expansion.

Variables `comint-output-filter-functions', a hook, and
`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
control whether input and output cause the window to scroll to the end of the
buffer.
(defalias 'shell-mode #[nil "\306 \210\307\310\311\n!\210,-./01234\312\313!\210\f\312\314!\210\315\f\312\316!\210\317\312\320!\210\317\312\321!\210\322\323\324\325\317\322$\21056\312\326!\210\3277!\330\331\332p!!@!8\333\334!\206 8\335\230\203s \336\202 8\337\230\203~ \340\202 \341\2119\342\232\204\222 \3439!\343\344!\232\203\225 \31798\345\230\203\240 \346\202\254 8\337\230\203\253 \347\202\254 \350:)\351\352!\210\353\322!\207" [major-mode mode-name shell-mode-map shell-prompt-pattern comint-prompt-regexp shell-completion-fignore comint-mode shell-mode "Shell" use-local-map make-local-variable paragraph-start font-lock-defaults (shell-font-lock-keywords t) shell-dirstack nil shell-last-dir shell-dirtrackp t add-hook comint-input-filter-functions shell-directory-tracker list-buffers-directory expand-file-name file-name-nondirectory process-command get-buffer-process getenv "HISTFILE" "bash" "~/.bash_history" "ksh" "~/.sh_history" "~/.history" "" file-truename "/dev/null" "sh" "pwd" "echo $PWD ~-" "dirs" run-hooks shell-mode-hook comint-read-input-ring comint-completion-fignore shell-delimiter-argument-list comint-delimiter-argument-list shell-file-name-chars comint-file-name-chars shell-file-name-quote-list comint-file-name-quote-list shell-dynamic-complete-functions comint-dynamic-complete-functions shell-input-autoexpand comint-input-autoexpand default-directory shell comint-input-ring-file-name shell-dirstack-query] 6 (#$ . 8268) nil])
#@1390 Run an inferior shell, with I/O through buffer *shell*.
If buffer exists but shell process is not running, make new shell.
If buffer exists and shell process is running, just switch to buffer `*shell*'.
Program used comes from variable `explicit-shell-file-name',
 or (if that is nil) from the ESHELL environment variable,
 or else from SHELL if there is no ESHELL.
If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
 (Note that this may lose due to a timing error if the shell
  discards input when it starts up.)
The buffer is put in Shell mode, giving commands for sending input
and controlling the subjobs of the shell.  See `shell-mode'.
See also the variable `shell-prompt-pattern'.

To specify a coding system for converting non-ASCII characters
in the input and output to the shell, use \[universal-coding-system-argument]
before \[shell].  You can also specify this with \[set-buffer-process-coding-system]
in the shell buffer, after you start the shell.
The default comes from `process-coding-system-alist' and
`default-process-coding-system'.

The shell file name (sans directories) is used to make a symbol name
such as `explicit-csh-args'.  If that symbol is a variable,
its value is used as a list of arguments when invoking the shell.
Otherwise, one argument `-i' is passed to the shell.

(Type \[describe-mode] in the shell buffer for a list of commands.)
(defalias 'shell #[nil "\306\307!\204S \206 \310\311!\206 \310\312!\206 \313\314	!\315\nP\316\317\n\320Q!\321\212\322\323\324	\325!\2055 \f\203D \326\f!\203D \fJ\202E \327%q\210p\330 \210)\331!-\207\331\307!\207" [explicit-shell-file-name prog name startfile xargs-name shell-buffer comint-check-proc "*shell*" getenv "ESHELL" "SHELL" "/bin/sh" file-name-nondirectory "~/.emacs_" intern-soft "explicit-" "-args" nil apply make-comint "shell" file-exists-p boundp ("-i") shell-mode pop-to-buffer] 7 (#$ . 12513) nil])
#@666 Tracks cd, pushd and popd commands issued to the shell.
This function is called on each input passed to the shell.
It watches for cd, pushd and popd commands and sets the buffer's
default directory to track these commands.

You may toggle this tracking on and off with M-x dirtrack-mode.
If emacs gets confused, you can resync with the shell with M-x dirs.

See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp',
and  `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', 
and `shell-pushd-dunique' control the behavior of the relevant command.

Environment variables are expanded, see function `substitute-in-file-name'.
(defalias 'shell-directory-tracker #[(str) "\205 \301\302\303\217\207" [shell-dirtrackp chdir-failure (byte-code "\306\307\"\210\310\225\311\211\211\306\f#\205\211 \310\225\312\fO\310\211#\312\fO\313\211#\306\314\315Q\n\"\203? \316\317	!!\210\202} \306\314\315Q\n\"\203S \320\317	!!\210\202} \306\314\315Q\n\"\203g \321\317	!!\210\202} \203} \306\314\315Q\n\"\203} \321\317\n!!\210\306\322#\210\310\225\202 ,\207" [str arg1 cmd end start shell-command-regexp string-match "^[; 	]*" 0 nil comint-arguments 1 "\\`\\(" "\\)\\($\\|[ 	]\\)" shell-process-popd comint-substitute-in-file-name shell-process-pushd shell-process-cd "[; 	]*" shell-popd-regexp shell-pushd-regexp shell-cd-regexp shell-chdrive-regexp] 4) ((error "Couldn't cd"))] 3 (#$ . 14439)])
(defalias 'shell-process-popd #[(arg) "\305!\206 \306\211\203# 	\306U\203# \n\203# \307\n@!\210\nA\310 \202O 	\203L 	\306V\203L 	\nGX\203L \311\nB	S\233\211\211AA\241\210A\310 *\202O \312\313!)\207" [arg num shell-dirstack ds cell shell-extract-num 0 shell-cd shell-dirstack-message nil error "Couldn't popd"] 3])
(defalias 'shell-prefixed-directory-name #[(dir) "G\302U\203	 	\207\303	!\203 	P\207\304	!\207" [comint-file-name-prefix dir 0 file-name-absolute-p expand-file-name] 2])
(defalias 'shell-process-cd #[(arg) "G\305U\203 	\306P\202 \307\230\203 \n\202 \310!\f\311!\210\312 )\207" [arg comint-file-name-prefix shell-last-dir new-dir default-directory 0 "~" "-" shell-prefixed-directory-name shell-cd shell-dirstack-message] 2])
(defalias 'shell-process-pushd #[(arg) "\306!G\307U\2035 \n\203 \310\311P!\202\304 \f\203/ \312\f@!\210\fAB\313 )\202\304 \314\315!\202\304 	\247\203\247 	\fGV\203G \314\316!\202\304 	\307U\203U \317\314\320!!\202\304 \203s 	S\f8\321!\210\310!\210\312!\210\313 )\202\304 \fB\211G	\233\322	Z\322!\233!\323\"\312@!\210A\313 -\202\304 \312\324!!\210\203\274 \f\235\204\301 \fB\313 ))\207" [arg num shell-pushd-tohome comint-file-name-prefix shell-dirstack default-directory shell-extract-num 0 shell-process-pushd "~" shell-cd shell-dirstack-message message "Directory stack empty." "Directory stack not that deep." error "Couldn't cd." shell-process-popd reverse append shell-prefixed-directory-name old shell-pushd-dextract dir ds dslen front back new-ds old-wd shell-pushd-dunique] 5])
(defalias 'shell-extract-num #[(str) "\301\302\"\205\n \303!\207" [str string-match "^\\+[1-9][0-9]*$" string-to-int] 3])
#@55 Turn directory tracking on and off in a shell buffer.
(defalias 'shell-dirtrack-mode #[nil "?\211\203\f 	\202 \303\304\305\203 \306\202 \307\"\207" [shell-dirtrackp default-directory list-buffers-directory nil message "Directory tracking %s" "ON" "OFF"] 3 (#$ . 17618) nil])
(byte-code "\300\301\302\"\210\300\303\302\"\210\300\304\302\"\207" [defalias shell-dirtrack-toggle shell-dirtrack-mode dirtrack-toggle dirtrack-mode] 3)
#@58 Do normal `cd' to DIR, and set `list-buffers-directory'.
(defalias 'shell-cd #[(dir) "\203\n \303\304	!!\305	!\207" [shell-dirtrackp dir list-buffers-directory file-name-as-directory expand-file-name cd] 3 (#$ . 18061)])
#@496 Resync the buffer's idea of the current directory stack.
This command queries the shell with the command bound to 
`shell-dirstack-query' (default "dirs"), reads the next
line output and parses it to form the new directory stack.
DON'T issue this command unless the buffer is at a shell prompt.
Also, note that if some other subprocess decides to do output
immediately after the query, its output will be taken as the
new directory stack -- you lose. If this happens, just do the
command again.
(defalias 'shell-resync-dirs #[nil "\306p!\307!\211b\210\nc\210\310c\210\311\312!\210\313\n\"\210\313\310\"\210	`\314\223\210`\310c\210\315\316!\210\317\320!\204= \321!\210b\210\202- )	b\210\322\316!\210\312\224\312\225S{\211G\314\312\312W\203x \323\324\f#\210\f\316\224\316\225OPB\312\225\211\202V \237\314\325\326\217.\207" [proc pmark shell-dirstack-query pt dl dl-len get-buffer-process process-mark "\n" sit-for 0 comint-send-string nil backward-char 1 looking-at ".+\n" accept-process-output delete-char string-match "\\s *\\(\\S +\\)\\s *" (byte-code "\303@!\210A\211@\304 \207" [ds shell-dirstack shell-last-dir shell-cd shell-dirstack-message] 3) ((error (message "Couldn't cd."))) ds i comint-file-name-prefix] 5 (#$ . 18291) nil])
(defalias 'dirs 'shell-resync-dirs)
(defalias 'shell-dirstack-message #[nil "\306	\nB\307\f\310P!\211G\203m @\211GY\2035 \311O\230\2035 \310\312OP\f\203^ G\fGY\203^ \f\311\fGO\230\203^ \fG\312O\211\203^ \240\210\313!\314QA)\202 \315\316\",\207" [msg default-directory shell-dirstack ds comint-file-name-prefix home "" expand-file-name "~/" 0 nil directory-file-name " " message "%s" homelen dir] 5])
#@67 Return as a string the shell's value of environment variable VAR.
(defalias 'shell-snarf-envar #[(var) "\305\306\"\307p!\310\n!\211b\210	c\210\311\312!\210\313\n	\"\210`\314\223\210`\315c\210\316\317!\210\320\321!\204: \322\n!\210\fb\210\202* )b\210\323\317!\210\312\224\312\225S{+\207" [var cmd proc pmark pt format "printenv '%s'\n" get-buffer-process process-mark sit-for 0 comint-send-string nil "\n" backward-char 1 looking-at ".+\n" accept-process-output delete-char] 4 (#$ . 20009)])
#@334 Copy the environment variable VARIABLE from the subshell to Emacs.
This command reads the value of the specified environment variable
in the shell, and sets the same environment variable in Emacs
(what `getenv' in Emacs would return) to that value.
That value will affect any new subprocesses that you subsequently start
from Emacs.
(defalias 'shell-copy-environment-variable #[(variable) "\301\302!\"\207" [variable setenv shell-snarf-envar] 4 (#$ . 20514) (list (read-envvar-name "Copy Shell environment variable to Emacs: "))])
#@94 Move forward across ARG shell command(s).  Does not cross lines.
See `shell-command-regexp'.
(defalias 'shell-forward-command #[(&optional arg) "\212\303\210`)\304	\305P\306\n$\205 \307\310!)\207" [limit shell-command-regexp arg nil re-search-forward "\\([;&|][	 ]*\\)+" move skip-syntax-backward " "] 5 (#$ . 21053) "p"])
#@95 Move backward across ARG shell command(s).  Does not cross lines.
See `shell-command-regexp'.
(defalias 'shell-backward-command #[(&optional arg) "\212\303\304!\210`)\211`V\203 \212\305y\210`)\306\307\"\210\310\311\312	\"\313\n$\205- \314\224b\210\315\304w)\207" [limit shell-command-regexp arg comint-bol nil 0 skip-syntax-backward " " re-search-backward format "[;&|]+[	 ]*\\(%s\\)" move 1 ";&|"] 6 (#$ . 21386) "p"])
#@458 Dynamically complete the command at point.
This function is similar to `comint-dynamic-complete-filename', except that it
searches `exec-path' (minus the trailing emacs library path) for completion
candidates.  Note that this may not be the same as the shell's idea of the
path.

Completion is dependent on the value of `shell-completion-execonly', plus
those that effect file completion.  See `shell-dynamic-complete-as-command'.

Returns t if successful.
(defalias 'shell-dynamic-complete-command #[nil "\302 \211\205( \303 \304\216\305\306\"*?\205( \307\224\212\310\311!\210`)=\205( \312\313!\210\314 )\207" [filename save-match-data-internal comint-match-partial-filename match-data ((set-match-data save-match-data-internal)) string-match "[~/]" 0 shell-backward-command 1 message "Completing command name..." shell-dynamic-complete-as-command] 4 (#$ . 21818) nil])
#@110 Dynamically complete at point as a command.
See `shell-dynamic-complete-filename'.  Returns t if successful.
(defalias 'shell-dynamic-complete-as-command #[nil "\306 \206 \307\310!\311\n!A\312\313\f!!\205! \314\315\316#\307\317\307\307\317 \203\247 \312\320@\206> \321!!\322!\205N \323	\"\211\203\240 @P \235\204\227 \203v \324\"\204\227 \230\204\204 \325!\204\227 !\203\220 \326!\203\227  B A\211\204T A\211\2046 \317\"\327	 \")\211#\330>\203\307 \"\203\307 \325\306 !\204\307 \331c\210#.\207" [filename pathnondir exec-path paths default-directory cwd comint-match-partial-filename "" file-name-nondirectory reverse file-name-as-directory expand-file-name mapconcat #[(x) "\301!\302P\207" [x regexp-quote "$"] 2] "\\|" nil comint-directory "." file-accessible-directory-p file-name-all-completions string-match file-directory-p file-executable-p comint-dynamic-simple-complete (sole shortest) " " comint-completion-fignore ignored-extensions path comps-in-path file filepath completions shell-completion-execonly comint-completion-addsuffix success] 5 (#$ . 22699)])
#@62 Return the shell variable at point, or nil if none is found.
(defalias 'shell-match-partial-variable #[nil "\212`\301\302\303\304#\203 \305\306!\204 \307u\210l\206 \305\310!?\205) \311\312\"\210\313\224\313\225{*\207" [limit re-search-backward "[^A-Za-z0-9_{}]" nil move looking-at "\\$" 1 "[^A-Za-z0-9_{}$]" re-search-forward "\\$?{?[A-Za-z0-9_]*}?" 0] 4 (#$ . 23849)])
#@738 Dynamically complete the environment variable at point.
Completes if after a variable, i.e., if it starts with a "$".
See `shell-dynamic-complete-as-environment-variable'.

This function is similar to `comint-dynamic-complete-filename', except that it
searches `process-environment' for completion candidates.  Note that this may
not be the same as the interpreter's idea of variable names.  The main problem
with this type of completion is that `process-environment' is the environment
which Emacs started with.  Emacs does not track changes to the environment made
by the interpreter.  Perhaps it would be more accurate if this function was
called `shell-dynamic-complete-process-environment-variable'.

Returns non-nil if successful.
(defalias 'shell-dynamic-complete-environment-variable #[nil "\301 \211\205 \302\303\"\205 \304\305!\210\306 )\207" [variable shell-match-partial-variable string-match "^\\$" message "Completing variable name..." shell-dynamic-complete-as-environment-variable] 4 (#$ . 24232) nil])
#@153 Dynamically complete at point as an environment variable.
Used by `shell-dynamic-complete-environment-variable'.
Uses `comint-dynamic-simple-complete'.
(defalias 'shell-dynamic-complete-as-environment-variable #[nil "\306 \206 \307\211\310\311\"\206 \312\313O\314\315\n\"\f\313\316	\"\211\317>\203m \306 \211\310\320\"\313O\310\321\"\203> \322\202J \310\323\"\203I \324\202J \307\204T \307\202c \325\326\327	!!!\203b \330\202c \331\261\210,.\207" [var variable process-environment variables comint-completion-addsuffix addsuffix shell-match-partial-variable "" string-match "[^$({]\\|$" 0 nil mapcar #[(x) "\301\302\303\"O\207" [x 0 string-match "="] 5] comint-dynamic-simple-complete (sole shortest) "[^$({]" "{" "}" "(" ")" file-directory-p comint-directory getenv "/" " " success protection suffix] 5 (#$ . 25262)])
#@181 Expand directory stack reference before point.
Directory stack references are of the form "=digit" or "=-".
See `default-directory' and `shell-dirstack'.

Returns t if successful.
(defalias 'shell-replace-by-expanded-directory #[nil "\304 \205M \212\305\224b\210	B\306\307!\203 	G\202% \306\310!\205% \311\312\224\312\225{!\n\204/ \313\202L \nGY\203< \314\315!\202L \316\317\n8!\320\211#\210\321\322\n\"\210\320+\207" [default-directory shell-dirstack index stack comint-match-partial-filename 0 looking-at "=-/?" "=\\([0-9]+\\)" string-to-number 1 nil error "Directory stack not that deep." replace-match file-name-as-directory t message "Directory item: %d"] 4 (#$ . 26119) nil])
(provide 'shell)
