aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-08 17:43:07 +0000
committerRichard M. Stallman1994-03-08 17:43:07 +0000
commite11284d5d2e49992d0bc14f01462a4413cd47551 (patch)
tree78533ee426ed8f16dc5758ff37cf588222d65e11
parentc58632fc81146eb6bb03bf85c43128884179fc05 (diff)
downloademacs-e11284d5d2e49992d0bc14f01462a4413cd47551.tar.gz
emacs-e11284d5d2e49992d0bc14f01462a4413cd47551.zip
(shell-completion-fignore): New variable.
(shell-mode): Use it to set comint-completion-fignore. (shell-dynamic-complete-as-command): Use it.
-rw-r--r--lisp/shell.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index e38a60e5953..33a60fdedd9 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -153,6 +153,14 @@ on lines which don't start with a prompt.
153 153
154This is a fine thing to set in your `.emacs' file.") 154This is a fine thing to set in your `.emacs' file.")
155 155
156(defvar shell-completion-fignore nil
157 "*List of suffixes to be disregarded during file/command completion.
158This variable is used to initialize `comint-completion-fignore' in the shell
159buffer. The default is nil, for compatibility with most shells.
160Some people like (\"~\" \"#\" \"%\").
161
162This is a fine thing to set in your `.emacs' file.")
163
156(defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;) 164(defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;)
157 "List of characters to recognise as separate arguments. 165 "List of characters to recognise as separate arguments.
158This variable is used to initialize `comint-delimiter-argument-list' in the 166This variable is used to initialize `comint-delimiter-argument-list' in the
@@ -300,16 +308,18 @@ are used to match their respective commands, while `shell-pushd-tohome',
300`shell-pushd-dextract' and `shell-pushd-dunique' control the behavior of the 308`shell-pushd-dextract' and `shell-pushd-dunique' control the behavior of the
301relevant command. 309relevant command.
302 310
303Variables `comint-completion-autolist', `comint-completion-addsuffix' and 311Variables `comint-completion-autolist', `comint-completion-addsuffix',
304`comint-completion-recexact' control the behavior of file name, command name 312`comint-completion-recexact' and `comint-completion-fignore' control the
305and variable name completion. Variable `shell-completion-execonly' controls 313behavior of file name, command name and variable name completion. Variable
306the behavior of command name completion. 314`shell-completion-execonly' controls the behavior of command name completion.
315Variable `shell-completion-fignore' is used to initialise the value of
316`comint-completion-fignore'.
307 317
308Variables `comint-input-ring-file-name' and `comint-input-autoexpand' control 318Variables `comint-input-ring-file-name' and `comint-input-autoexpand' control
309the initialisation of the input ring history, and history expansion. 319the initialisation of the input ring history, and history expansion.
310 320
311Variables `comint-output-filter-functions', a hook, and 321Variables `comint-output-filter-functions', a hook, and
312`comint-scroll-to-bottom-on-input',and `comint-scroll-to-bottom-on-output' 322`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
313control whether input and output cause the window to scroll to the end of the 323control whether input and output cause the window to scroll to the end of the
314buffer." 324buffer."
315 (interactive) 325 (interactive)
@@ -318,6 +328,7 @@ buffer."
318 (setq mode-name "Shell") 328 (setq mode-name "Shell")
319 (use-local-map shell-mode-map) 329 (use-local-map shell-mode-map)
320 (setq comint-prompt-regexp shell-prompt-pattern) 330 (setq comint-prompt-regexp shell-prompt-pattern)
331 (setq comint-completion-fignore shell-completion-fignore)
321 (setq comint-delimiter-argument-list shell-delimiter-argument-list) 332 (setq comint-delimiter-argument-list shell-delimiter-argument-list)
322 (setq comint-dynamic-complete-functions shell-dynamic-complete-functions) 333 (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
323 (make-local-variable 'paragraph-start) 334 (make-local-variable 'paragraph-start)
@@ -678,7 +689,7 @@ See `shell-dynamic-complete-filename'. Returns t if successful."
678 (cwd (file-name-as-directory (expand-file-name default-directory))) 689 (cwd (file-name-as-directory (expand-file-name default-directory)))
679 (ignored-extensions 690 (ignored-extensions
680 (mapconcat (function (lambda (x) (concat (regexp-quote x) "$"))) 691 (mapconcat (function (lambda (x) (concat (regexp-quote x) "$")))
681 completion-ignored-extensions "\\|")) 692 comint-completion-fignore "\\|"))
682 (path "") (comps-in-path ()) (file "") (filepath "") (completions ())) 693 (path "") (comps-in-path ()) (file "") (filepath "") (completions ()))
683 ;; Go thru each path in the search path, finding completions. 694 ;; Go thru each path in the search path, finding completions.
684 (while paths 695 (while paths