GNU bug report logs -
#70012
shell-resync-dirs broken on windows
Previous Next
Reported by: Sam Steingold <sds <at> gnu.org>
Date: Tue, 26 Mar 2024 16:26:02 UTC
Severity: normal
Tags: notabug, wontfix
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Fri, 29 Mar 2024 at 09:14, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 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?
>
> That's not really TRT, because it assumes every bash.exe is an MSYS
> program (which might not be true: there's a Cygwin Bash, for example).
I am pretty sure they are compatible in this way.
> And we don't need to make such assumptions:
>
> (w32-application-type (executable-find "bash.exe"))
> => msys
>
> I'm okay with installing the fix after you change it to use
> w32-application-type (and verifying that it works in your case, of
> course: I don't have MSYS2 Bash installed).
done.
> > Incidentally, why do you use `dirs` instead of `pwd` there?
> > you use only the last dir anyway.
>
> I don't know, I'm not familiar with shell.el well enough. Just by
> looking at the code, shell-resync-dirs does need to know all the
> stack, so it could refresh the value of shell-dirstack, no?
nope.
`pwd` is already used for sh and ksh.
only the last line of `dirs` output is ever used.
This bug report was last modified 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.