bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70012: shell-resync-dirs broken on windows


From: Sam Steingold
Subject: bug#70012: shell-resync-dirs broken on windows
Date: Fri, 29 Mar 2024 08:17:26 -0400

On Thu, Mar 28, 2024, 02:59 Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Sam Steingold <sds@gnu.org>
> > which bash builds are supported on windows?
>
> Any native build of Bash would be supported.  Except that I'm not
> aware of any such port of Bash, unfortunately.

I admire your sense of humor.

> Maybe the MSYS or Cygwin Bash can be told to output Windows-format
> file names with drive letters?  I know that "pwd -W", for example,
> shows the current directory in Windows format, so maybe there are
> other similar tricks?

Please upvote https://github.com/msys2/MSYS2-packages/issues/4472
(however, even with `dirs -W`, emacs would need to be patched)

Incidentally, why do you use `dirs` instead of `pwd` there?
you use only the last dir anyway.

finally, the following patch fixes the bug for me:

--- shell.el~ 2024-03-06 12:13:15.134281800 -0500
+++ shell.el 2024-03-28 11:50:32.920026000 -0400
@@ -711,6 +711,7 @@
    ((string-equal shell "ksh") "echo $PWD ~-")
    ;; Bypass any aliases.  TODO all shells could use this.
    ((string-equal shell "bash") "command dirs")
+   ((string-equal shell "bash.exe") "command pwd -W")
    ((string-equal shell "zsh") "dirs -l")
    (t "dirs")))
       ;; Bypass a bug in certain versions of bash.

may I push it?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]