diff options
| author | Simon Marshall | 1996-02-03 13:38:32 +0000 |
|---|---|---|
| committer | Simon Marshall | 1996-02-03 13:38:32 +0000 |
| commit | 221ca406baee7c4267c75ea156a835fe44b66786 (patch) | |
| tree | c664f53b7fbcfb17058b47a8924289f393fe957a | |
| parent | b2926fb3ef490a8aa31b1fb548df537cd6a1f343 (diff) | |
| download | emacs-221ca406baee7c4267c75ea156a835fe44b66786.tar.gz emacs-221ca406baee7c4267c75ea156a835fe44b66786.zip | |
Resync directories properly for the ksh.
| -rw-r--r-- | lisp/shell.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 06a7293af4a..36051003624 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; shell.el --- specialized comint.el for running the shell. | 1 | ;;; shell.el --- specialized comint.el for running the shell. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1993, 1994, 1995 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1988, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 5 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 6 | ;; Maintainer: Simon Marshall <simon@gnu.ai.mit.edu> | 6 | ;; Maintainer: Simon Marshall <simon@gnu.ai.mit.edu> |
| @@ -114,7 +114,7 @@ This variable is used to initialise `comint-prompt-regexp' in the | |||
| 114 | shell buffer. | 114 | shell buffer. |
| 115 | 115 | ||
| 116 | The pattern should probably not match more than one line. If it does, | 116 | The pattern should probably not match more than one line. If it does, |
| 117 | shell-mode may become confused trying to distinguish prompt from input | 117 | Shell mode may become confused trying to distinguish prompt from input |
| 118 | on lines which don't start with a prompt. | 118 | on lines which don't start with a prompt. |
| 119 | 119 | ||
| 120 | This is a fine thing to set in your `.emacs' file.") | 120 | This is a fine thing to set in your `.emacs' file.") |
| @@ -341,7 +341,9 @@ buffer." | |||
| 341 | (equal (file-truename comint-input-ring-file-name) "/dev/null")) | 341 | (equal (file-truename comint-input-ring-file-name) "/dev/null")) |
| 342 | (setq comint-input-ring-file-name nil)) | 342 | (setq comint-input-ring-file-name nil)) |
| 343 | (setq shell-dirstack-query | 343 | (setq shell-dirstack-query |
| 344 | (if (string-match "^k?sh$" shell) "pwd" "dirs"))) | 344 | (cond ((string-equal shell "sh") "pwd") |
| 345 | ((string-equal shell "ksh") "echo $PWD ~-") | ||
| 346 | (t "dirs")))) | ||
| 345 | (run-hooks 'shell-mode-hook) | 347 | (run-hooks 'shell-mode-hook) |
| 346 | (comint-read-input-ring t)) | 348 | (comint-read-input-ring t)) |
| 347 | 349 | ||
| @@ -516,8 +518,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 516 | (shell-dirstack | 518 | (shell-dirstack |
| 517 | (let ((old default-directory)) | 519 | (let ((old default-directory)) |
| 518 | (shell-cd (car shell-dirstack)) | 520 | (shell-cd (car shell-dirstack)) |
| 519 | (setq shell-dirstack | 521 | (setq shell-dirstack (cons old (cdr shell-dirstack))) |
| 520 | (cons old (cdr shell-dirstack))) | ||
| 521 | (shell-dirstack-message))) | 522 | (shell-dirstack-message))) |
| 522 | (t | 523 | (t |
| 523 | (message "Directory stack empty.")))) | 524 | (message "Directory stack empty.")))) |
| @@ -617,7 +618,8 @@ command again." | |||
| 617 | (let ((ds (nreverse ds))) | 618 | (let ((ds (nreverse ds))) |
| 618 | (condition-case nil | 619 | (condition-case nil |
| 619 | (progn (shell-cd (car ds)) | 620 | (progn (shell-cd (car ds)) |
| 620 | (setq shell-dirstack (cdr ds)) | 621 | (setq shell-dirstack (cdr ds) |
| 622 | shell-last-dir (car shell-dirstack)) | ||
| 621 | (shell-dirstack-message)) | 623 | (shell-dirstack-message)) |
| 622 | (error (message "Couldn't cd."))))))) | 624 | (error (message "Couldn't cd."))))))) |
| 623 | 625 | ||