dsh-git-bash
在Windows上将DSH内置Bash工具挂载至Git Bash 适合Windows用户,解决无PowerShell时运行Bash工具的问题。
同名包的其他仓库
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Fishquito7/dsh-gitbash说明文档
阅读完整 README ↗配置
| 项 | 说明 |
|---|---|
bashPath(行 config) | 显式指定 bash.exe 绝对路径,优先级最高 |
DSH_GIT_BASH | 同上,走环境变量 |
行 config | 沿用上游 dsh-bash-local 的全部字段:cwd、timeoutMs、maxTimeoutMs、maxOutputBytes、maxSpillBytes、graceMs |
不配置也能用。 Git 的安装位置与安装习惯因人而异(机器级 / 用户级 / scoop / chocolatey),所以插件自己按顺序找:
行
config的bashPath→ 环境变量DSH_GIT_BASH→ 注册表HKLM/HKCU下SOFTWARE\GitForWindows的InstallPath→%ProgramFiles%\Git\bin→%ProgramFiles(x86)%→%ProgramW6432%→%LOCALAPPDATA%\Programs\Git\bin(用户级安装)→ scoop → chocolatey → PATH 里各项的bash.exe,以及git.exe同级的..\bin\bash.exe。最后一条很关键:Git 安装器默认只把
Git\cmd放进 PATH,从不放Git\bin—— 这正是裸bash在 Windows 上找不到的原因。全部落空时不会退到 WSL 的
bash(那是另一个内核里的 Linux 进程,语义不对),而是报一条列出所有尝试路径的错误。