dsh pluginsEnglish
← 返回热门插件目录

bash encoding · DSH 插件精选目录

omdsh-dev/dsh-bash-encoding · 工具

DSH bash 输出编码自动识别插件:替换 ctx.bash,自管 spawn 收集原始字节,自动检测 UTF-16LE/UTF-8/GBK 等编码并正确解码,修复 WSL/Windows 下 bash 工具的中文乱码。

★ 2GitHub 星标
0分支
2026-08-25最近更新
TypeScript开发语言
BSD-3-Clause许可证

主要功能

  • 平台层 windows.cordis.patch.yml 已插入 pwsh-sandbox(SandboxPwshExecutor),与本插件一样会注册 ctx.shell
  • NUL 奇偶位锚定(ASCII 子段,如 wsl)
  • 同一 context 只允许一个 ctx.shell provider,同时启用会启动失败(重复服务注册)。
  • 本插件以 bash -c 方式 spawn,面向 POSIX bash 组合(替换 dsh-bash-local)
  • Windows 原生 profile 走 pwsh 栈、无 bash runner,本就不适用。

使用条件

  • 实测(同源本地基线)npm 基线安装后运行时加载通过,单元测试 26 例中 25 通过(唯一失败为本机 WSL localhost 代理警告混入 stderr 的环境噪音,解码行为本身正确)。
  • 接入方式变化同一 context 只允许一个 ctx.shell provider。

安装命令

dsh plugin --profile web add github:omdsh-dev/dsh-bash-encoding
查看 GitHub 仓库 ↗返回热门插件目录