Skip to content

[BUG REPORT] Windows 上使用git for windows 的 bash 时 右侧栏 目录状态不改变 #13

Closed

Description

@lesca

Where

Windows

What happened

Windows客户端中使用Git for Windows的Bash

Shell 路径配置:C:\Program Files\Git\bin\sh.exe

此时cd目录右侧栏目录不会改变。

Steps to reproduce

在Terminal设置中将shell路径设置成 C:\Program Files\Git\bin\sh.exe

然后重启Terminal,cd任意目录,此时右侧栏目录状态不改变。

What you expected

可以检测 sh.exe 获取当前目录和 git 状态

Commit or version

f360143

Logs

Activity

  1. added
    bug
    on Oct 22, 2026
  2. Raiden-MeixElysia commented on Oct 24, 2026

    @Raiden-MeixElysia
    Contributor

    谢谢你的报告,说得很清楚。

    已在 main 修好(46047a3、92f6199):

    • Git for Windows 的 bin\sh.exe 和 bin\bash.exe 是同一个启动器,跑的都是它的 usr\bin\bash.exe。现在 ELYTerminal 把这个 sh.exe 当 bash 启动,加载 shell integration。
    • MSYS 的 bash 用 /c/... 和 /tmp/... 这样的路径,Windows 读不懂。现在每个提示符都用 pwd -W 报告 Windows 名下的目录,右侧的 Files 和 Git 会跟着 cd 走。名字里带冒号、控制字符或末尾换行的目录,也按 Windows 实际保存的名字报告。

    在一台 Windows 11 上,用 Git 的 sh.exe 通过 ConPTY 实测:带空格的目录、cd 进子目录、上面几种特殊名字,都报对了。

    这个修复会进下一个版本。还有问题的话,重新打开这个 issue 就好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions