changeset 6255:277d9ace9f5d

(shell-completion-fignore): New variable. (shell-mode): Use it to set comint-completion-fignore. (shell-dynamic-complete-as-command): Use it.
author Richard M. Stallman <rms@gnu.org>
date Tue, 08 Mar 1994 17:43:07 +0000
parents a147d798ed0d
children 3810012eb29f
files lisp/shell.el
diffstat 1 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Tue Mar 08 16:33:28 1994 +0000
+++ b/lisp/shell.el	Tue Mar 08 17:43:07 1994 +0000
@@ -153,6 +153,14 @@
 
 This is a fine thing to set in your `.emacs' file.")
 
+(defvar shell-completion-fignore nil
+  "*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.")  
+
 (defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;)
   "List of characters to recognise as separate arguments.
 This variable is used to initialize `comint-delimiter-argument-list' in the
@@ -300,16 +308,18 @@
 `shell-pushd-dextract' and `shell-pushd-dunique' control the behavior of the
 relevant command.
 
-Variables `comint-completion-autolist', `comint-completion-addsuffix' and
-`comint-completion-recexact' control the behavior of file name, command name
-and variable name completion.  Variable `shell-completion-execonly' controls
-the behavior of command name completion.
+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'
+`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."
   (interactive)
@@ -318,6 +328,7 @@
   (setq mode-name "Shell")
   (use-local-map shell-mode-map)
   (setq comint-prompt-regexp shell-prompt-pattern)
+  (setq comint-completion-fignore shell-completion-fignore)
   (setq comint-delimiter-argument-list shell-delimiter-argument-list)
   (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
   (make-local-variable 'paragraph-start)
@@ -678,7 +689,7 @@
 	 (cwd (file-name-as-directory (expand-file-name default-directory)))
 	 (ignored-extensions
 	  (mapconcat (function (lambda (x) (concat (regexp-quote x) "$")))
-		     completion-ignored-extensions "\\|"))
+		     comint-completion-fignore "\\|"))
 	 (path "") (comps-in-path ()) (file "") (filepath "") (completions ()))
     ;; Go thru each path in the search path, finding completions.
     (while paths