DSH 插件精选目录
lhh010/dsh-bash-encoding · 工具
DSH bash 输出编码自动识别插件:替换 ctx.bash,自管 spawn 收集原始字节,自动检测 UTF-16LE/UTF-8/GBK 等编码并正确解码,修复 WSL/Windows 下 bash 工具的中文乱码。
★ 8GitHub 星标
1分支
2026-08-14最近更新
TypeScript开发语言
BSD-3-Clause许可证
主要功能
- 平台层 windows.cordis.patch.yml 已插入 pwsh-sandbox(SandboxPwshExecutor),与本插件一样会注册 ctx.bash
- NUL 奇偶位锚定(ASCII 子段,如 wsl)
- 同一 context 只允许一个 ctx.bash 实现,同时启用会启动失败(service bash has been registered at )。
- 本插件以 bash -c 方式 spawn,面向 POSIX bash 组合(替换 dsh-bash-local)
- Windows 原生 profile 走 pwsh 栈、无 bash runner,本就不适用。
使用条件
- 实测(同源本地基线)npm 基线安装后运行时加载通过,单元测试 26 例中 25 通过(唯一失败为本机 WSL localhost 代理警告混入 stderr 的环境噪音,解码行为本身正确)。
- 经 dsh plugin/pnpm 安装自动处理,运行不受影响。
安装命令
dsh plugin --profile web add github:lhh010/dsh-bash-encoding