Repository navigation
fix(complete): mark directory candidates per -o filename semantics - #2621
Conversation
GNU rl_filename_completion_desired (pcomplete.c:1461-1462, -o filenames; bashline.c:1801+, filename fallback): candidates produced under filename semantics mark directories with a trailing `/` so the insert layer keeps the path open. Applied where the spec declares it: -o filenames marks all candidates; candidates sourced by the -o dirnames/plusdirs/default fallbacks mark themselves. compgen output stays bare — the mark is an insert-layer semantic. Refs rubash#2570, niubash#828 follow-up. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
# Conflicts: # src/builtins/complete.rs
…ry '/' under filename semantics (captain) The #2621 engine change materializes GNU's rl_filename_completion_desired mark (pcomplete.c:1461-1462) in the candidate list itself, because this engine's list is final for the host. The six fallback pins from #2594 asserted the pre-marking bare contract; they now assert the marked forms, and a new pin covers the -o filenames generator face plus its gating (no option -> bare).
|
主会话接手审核结论(2026-11-03,用户指派): 问题是否已被 master 修复:否。 master 只有 API 里的 审核中发现并已处理的问题:本 PR 基于旧版函数形态( 契约变化(队长裁定):标记落在引擎候选列表本身——本引擎的候选列表对宿主即终局(complete.rs 既有注释),且与「标记归引擎、宿主只消费」的结构口径一致。原 #2570 的六条钉断言的是标记前的裸名契约,队长已在 7b90714 中改钉为标记形态,并新增一条钉覆盖 队长验收:issue2570 10/10(含新钉);issue1544 15/15、issue427 14/14;complete 模块 lib 测试 8/8;regression 222p/6f 与基线逐项一致;cargo fmt --check 干净。已 push(7b907149),CI 绿后合入。 已知边缘残差(记录,不挡合入):以 |
Summary
Test plan
ls tool+TAB →ls tools/,ls ben+TAB →ls bench.shGenerated with Devin