mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Support `shell-resync-dirs' on msys bash (Bug#70012)
* lisp/shell.el (w32-application-type): Declare. (shell-mode): Set `shell-dirstack-query' to `pwd -W` when using msys bash.
This commit is contained in:
parent
1f19ddec5b
commit
6f7cb96543
1 changed files with 8 additions and 0 deletions
|
|
@ -606,6 +606,9 @@ Shell buffers. It implements `shell-completion-execonly' for
|
|||
|
||||
(defvar sh-shell-file)
|
||||
|
||||
(declare-function w32-application-type nil ; "src/w32proc.c"
|
||||
(program) t)
|
||||
|
||||
(define-derived-mode shell-mode comint-mode "Shell"
|
||||
"Major mode for interacting with an inferior shell.
|
||||
\\<shell-mode-map>
|
||||
|
|
@ -754,6 +757,11 @@ command."
|
|||
((string-equal shell "ksh") "echo $PWD ~-")
|
||||
;; Bypass any aliases. TODO all shells could use this.
|
||||
((string-equal shell "bash") "command dirs")
|
||||
((and (string-equal shell "bash.exe")
|
||||
(eq system-type 'windows-nt)
|
||||
(eq (w32-application-type (executable-find "bash.exe"))
|
||||
'msys))
|
||||
"command pwd -W")
|
||||
((string-equal shell "zsh") "dirs -l")
|
||||
(t "dirs")))
|
||||
;; Bypass a bug in certain versions of bash.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue