## 复现 ```bash compgen -d -- "~/" | sort ``` | | stdout | rc | |---|---|---| | GNU bash 5.3.0(WSL) | `~/.cache`、`~/.config`… 全量 `~` 下目录列表 | 0 | | rubash 764b9dde | (空) | 0 | ## 隔离(排除 HOME 差异因素) 同一 rubash 构建: ```bash compgen -d -- ~/ → 正常列出 $HOME 下目录 ✔ compgen -d -- "~/" → 空 ✘ ``` → 精确定位:**带引号的 tilde-slash 前缀不展开**,补全词通道把引号词当作字面前缀。补全 UI 场景(readline 词天然带引号属性)高频命中。 ## 规范/源码依据 - bash 手册(Programmable Completion,compgen):compgen 按 completion 词的规则对待 word——tilde 展开(含带引号形式)是补全词生成的固定步骤。 - GNU 实测:`compgen -d -- "~/"` 等价于 `compgen -d -- ~/`。 ## 跨实现互证(huck) - [huck#72 "named-user tilde (`~user`) immediately before `:` in a COMMAND word not expanded"](https://github.com/jdstanhope/huck/issues/72)(open)——tilde 展开识别面。 - [huck#295 "Refactor: move tilde-prefix recognition out of the lexer into the word-expansion phase"](https://github.com/jdstanhope/huck/issues/295)(open)——tilde 识别位置导致引号/上下文敏感性 bug 的架构归因,与本点同根因形态(tilde 识别不该看引号,该在展开阶段处理)。 ## 证据 - 语料出处:cd_completion_diff_check.sh:19(F136,label: compgen -d quoted ~/,huck 语料分类 product/补全) - 复核:764b9dde 仍复现;旧构建 41de8319 行为一致
Activity
fix: Wave4a P2 batch - redirect ambiguity gate, backtick diagnostic w…
caomengxuan666 commentedon Oct 12, 2026
Fixed by #576 (Wave4a). Vendored-bash anchors and RED-then-GREEN regression evidence in the PR.
fix(#2575): thread bind readline variables into the completion filter
fix(#2575): thread bind readline variables into the completion filter