summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-01-09 17:11:57 +0000
committerRichard M. Stallman <rms@gnu.org>1994-01-09 17:11:57 +0000
commit740676d47652910b31bcd774164e2912feecc49f (patch)
treeaf2d78a9d7ea8d4bc1113602b2852ae98634e918 /lisp/shell.el
parent71843cbf03b6593a74180adb20de5f922c771b71 (diff)
downloademacs-740676d47652910b31bcd774164e2912feecc49f.tar.gz
(shell-input-autoexpand): New variable.
(shell-mode): Set comint-input-autoexpand. (shell-mode): Don't call shell-dirstack-message.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 18fd50f822d..05179863d94 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -205,6 +205,18 @@ This mirrors the optional behavior of tcsh.")
"*Args passed to inferior shell by M-x shell, if the shell is csh.
Value is a list of strings, which may be nil.")
+(defvar shell-input-autoexpand 'history
+ "*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.")
+
;;; All the above vars aren't prefixed "cmushell-" to make them
;;; backwards compatible w/shell.el and old .emacs files.
@@ -292,6 +304,7 @@ cause the window to scroll to the end of the buffer."
(make-local-variable 'shell-dirtrackp)
(setq shell-dirtrackp t)
(setq comint-input-sentinel 'shell-directory-tracker)
+ (setq comint-input-autoexpand shell-input-autoexpand)
;; shell-dependent assignments.
(let ((shell (car (process-command (get-buffer-process (current-buffer))))))
(setq comint-input-ring-file-name
@@ -301,8 +314,7 @@ cause the window to scroll to the end of the buffer."
((string-match "ksh$" shell) "~/.sh_history")
(t "~/.history")))))
(run-hooks 'shell-mode-hook)
- (comint-read-input-ring t)
- (shell-dirstack-message))
+ (comint-read-input-ring t))
;;;###autoload
(defun shell ()