Fishquito7/dsh-gitbash ↗★ 0

dsh-git-bash

Mount DSH's stock bash tool on Windows against Git Bash (no PowerShell in the path). 适合Windows用户,解决无PowerShell时运行Bash工具的问题。

パッケージ
dsh-git-bash
互換性
未検証
バージョン
0.1.1
ライセンス
MIT
最終更新
2026/09/20

同名パッケージの別リポジトリ

インストール

$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 进程,语义不对),而是报一条列出所有尝试路径的错误。