dsh plugins中文
← Back to popular plugin directory

DSH plug-in selection directory

lhh010/dsh-bash-encoding · tools

BOM:UTF-8 () / UTF-16LE () / UTF-16BE () 3.

★ 7GitHub stars
1Forks
2026-08-14Last updated
TypeScriptLanguage
BSD-3-ClauseLicense

Project overview

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

在 Windows 原生(无 WSL)profile 下,本插件默认停用(cordis.patch.yml 注释段),原因: 平台层 windows.cordis.patch.yml 已插入 pwsh-sandbox(SandboxPwshExecutor),与本插件一样会注册 ctx.bash;同一 context 只允许一个 ctx.bash 实现,同时启用会启动失败(service bash has been registered at )。 本插件以 bash -c 方式 spawn,面向 POSIX bash 组合(替换 dsh-bash-local);Windows 原生 profile 走 pwsh 栈、无 bash runner,本就不适用。

本插件解决的是 Windows + WSL 组合下的中文乱码,典型触发条件: 条件 · 说明 条件: 操作系统 · 说明: Windows(DSH 运行在 Windows 侧,bash 经 WSL 执行) 条件: WSL 网络模式 · 说明: NAT 模式(%UserProfile%\.wslconfig 未设置 networkingMode=mirrored) 条件: 代理配置 · 说明: 环境变量 HTTPPROXY / HTTPSPROXY 指向 localhost

Install command

dsh plugin --profile web add github:lhh010/dsh-bash-encoding
View GitHub repository ↗Back to popular plugin directory