[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/shell.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/shell.el |
Date: |
Wed, 03 Apr 2002 10:23:41 -0500 |
Index: emacs/lisp/shell.el
diff -c emacs/lisp/shell.el:1.109 emacs/lisp/shell.el:1.110
*** emacs/lisp/shell.el:1.109 Mon Mar 11 16:13:14 2002
--- emacs/lisp/shell.el Wed Apr 3 10:23:41 2002
***************
*** 415,442 ****
(make-local-variable 'list-buffers-directory)
(setq list-buffers-directory (expand-file-name default-directory))
;; shell-dependent assignments.
! (let ((shell (file-name-nondirectory (car
! (process-command (get-buffer-process (current-buffer)))))))
! (setq comint-input-ring-file-name
! (or (getenv "HISTFILE")
! (cond ((string-equal shell "bash") "~/.bash_history")
! ((string-equal shell "ksh") "~/.sh_history")
! (t "~/.history"))))
! (if (or (equal comint-input-ring-file-name "")
! (equal (file-truename comint-input-ring-file-name)
! (file-truename "/dev/null")))
! (setq comint-input-ring-file-name nil))
! ;; Arrange to write out the input ring on exit, if the shell doesn't
! ;; do this itself.
! (if (and comint-input-ring-file-name
! (string-match shell-dumb-shell-regexp shell))
! (set-process-sentinel (get-buffer-process (current-buffer))
! #'shell-write-history-on-exit))
! (setq shell-dirstack-query
! (cond ((string-equal shell "sh") "pwd")
! ((string-equal shell "ksh") "echo $PWD ~-")
! (t "dirs"))))
! (comint-read-input-ring t))
(defun shell-write-history-on-exit (process event)
"Called when the shell process is stopped.
--- 415,443 ----
(make-local-variable 'list-buffers-directory)
(setq list-buffers-directory (expand-file-name default-directory))
;; shell-dependent assignments.
! (unless comint-input-ring
! (let ((shell (file-name-nondirectory (car
! (process-command (get-buffer-process (current-buffer)))))))
! (setq comint-input-ring-file-name
! (or (getenv "HISTFILE")
! (cond ((string-equal shell "bash") "~/.bash_history")
! ((string-equal shell "ksh") "~/.sh_history")
! (t "~/.history"))))
! (if (or (equal comint-input-ring-file-name "")
! (equal (file-truename comint-input-ring-file-name)
! (file-truename "/dev/null")))
! (setq comint-input-ring-file-name nil))
! ;; Arrange to write out the input ring on exit, if the shell doesn't
! ;; do this itself.
! (if (and comint-input-ring-file-name
! (string-match shell-dumb-shell-regexp shell))
! (set-process-sentinel (get-buffer-process (current-buffer))
! #'shell-write-history-on-exit))
! (setq shell-dirstack-query
! (cond ((string-equal shell "sh") "pwd")
! ((string-equal shell "ksh") "echo $PWD ~-")
! (t "dirs"))))
! (comint-read-input-ring t)))
(defun shell-write-history-on-exit (process event)
"Called when the shell process is stopped.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/shell.el,
Richard M. Stallman <=