diff options
| author | Roland McGrath | 1993-09-08 07:01:42 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-09-08 07:01:42 +0000 |
| commit | 36df718cbf8a6ac82bedc4d6ec244e6cd2db5abc (patch) | |
| tree | 0a83dfd697c209ab85311f9d770ab8de9d2b25ac /lisp/shell.el | |
| parent | fdfe2a28762cc7442e26371aa3b77bac5530366d (diff) | |
| download | emacs-36df718cbf8a6ac82bedc4d6ec244e6cd2db5abc.tar.gz emacs-36df718cbf8a6ac82bedc4d6ec244e6cd2db5abc.zip | |
(shell-resync-dirs, shell-process-cd, shell-process-pushd,
shell-process-popd): Prepend comint-filename-prefix to directory names when
calling cd.
Diffstat (limited to 'lisp/shell.el')
| -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 ccd3bf9fd90..ef7474ae822 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -382,7 +382,8 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 382 | (shell-extract-num arg)))) | 382 | (shell-extract-num arg)))) |
| 383 | (if (and num (< num (length shell-dirstack))) | 383 | (if (and num (< num (length shell-dirstack))) |
| 384 | (if (= num 0) ; condition-case because the CD could lose. | 384 | (if (= num 0) ; condition-case because the CD could lose. |
| 385 | (condition-case nil (progn (cd (car shell-dirstack)) | 385 | (condition-case nil (progn (cd (concat comint-filename-prefix |
| 386 | (car shell-dirstack))) | ||
| 386 | (setq shell-dirstack | 387 | (setq shell-dirstack |
| 387 | (cdr shell-dirstack)) | 388 | (cdr shell-dirstack)) |
| 388 | (shell-dirstack-message)) | 389 | (shell-dirstack-message)) |
| @@ -403,7 +404,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 403 | ((string-equal "-" arg) shell-last-dir) | 404 | ((string-equal "-" arg) shell-last-dir) |
| 404 | (t arg)))) | 405 | (t arg)))) |
| 405 | (setq shell-last-dir default-directory) | 406 | (setq shell-last-dir default-directory) |
| 406 | (cd new-dir) | 407 | (cd (concat comint-filename-prefix new-dir)) |
| 407 | (shell-dirstack-message)) | 408 | (shell-dirstack-message)) |
| 408 | (error (message "Couldn't cd.")))) | 409 | (error (message "Couldn't cd.")))) |
| 409 | 410 | ||
| @@ -413,7 +414,8 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 413 | ;; no arg -- swap pwd and car of shell stack | 414 | ;; no arg -- swap pwd and car of shell stack |
| 414 | (condition-case nil (if shell-dirstack | 415 | (condition-case nil (if shell-dirstack |
| 415 | (let ((old default-directory)) | 416 | (let ((old default-directory)) |
| 416 | (cd (car shell-dirstack)) | 417 | (cd (concat comint-filename-prefix |
| 418 | (car shell-dirstack))) | ||
| 417 | (setq shell-dirstack | 419 | (setq shell-dirstack |
| 418 | (cons old (cdr shell-dirstack))) | 420 | (cons old (cdr shell-dirstack))) |
| 419 | (shell-dirstack-message)) | 421 | (shell-dirstack-message)) |
| @@ -431,7 +433,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 431 | (back (reverse (nthcdr (- dslen num) (reverse ds)))) | 433 | (back (reverse (nthcdr (- dslen num) (reverse ds)))) |
| 432 | (new-ds (append front back))) | 434 | (new-ds (append front back))) |
| 433 | (condition-case nil | 435 | (condition-case nil |
| 434 | (progn (cd (car new-ds)) | 436 | (progn (cd (concat comint-filename-prefix (car new-ds))) |
| 435 | (setq shell-dirstack (cdr new-ds)) | 437 | (setq shell-dirstack (cdr new-ds)) |
| 436 | (shell-dirstack-message)) | 438 | (shell-dirstack-message)) |
| 437 | (error (message "Couldn't cd."))))) | 439 | (error (message "Couldn't cd."))))) |
| @@ -439,7 +441,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 439 | ;; pushd <dir> | 441 | ;; pushd <dir> |
| 440 | (let ((old-wd default-directory)) | 442 | (let ((old-wd default-directory)) |
| 441 | (condition-case nil | 443 | (condition-case nil |
| 442 | (progn (cd arg) | 444 | (progn (cd (concat comint-filename-prefix arg)) |
| 443 | (setq shell-dirstack | 445 | (setq shell-dirstack |
| 444 | (cons old-wd shell-dirstack)) | 446 | (cons old-wd shell-dirstack)) |
| 445 | (shell-dirstack-message)) | 447 | (shell-dirstack-message)) |
| @@ -501,7 +503,7 @@ command again." | |||
| 501 | (setq i (match-end 0))) | 503 | (setq i (match-end 0))) |
| 502 | (let ((ds (reverse ds))) | 504 | (let ((ds (reverse ds))) |
| 503 | (condition-case nil | 505 | (condition-case nil |
| 504 | (progn (cd (car ds)) | 506 | (progn (cd (concat comint-filename-prefix (car ds))) |
| 505 | (setq shell-dirstack (cdr ds)) | 507 | (setq shell-dirstack (cdr ds)) |
| 506 | (shell-dirstack-message)) | 508 | (shell-dirstack-message)) |
| 507 | (error (message "Couldn't cd."))))))) | 509 | (error (message "Couldn't cd."))))))) |