github / github/copilot-cli

@ file autocomplete breaks on paths containing spaces

未关闭
#2,731 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
area:input-keyboard
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

Autocomplete for @ file references doesn't seem to work for navigating into a folder with a space in the path.

### Affected version

GitHub Copilot CLI 1.0.27

### Steps to reproduce the behavior

1. Initial condition: A file exists at `c:\foo bar\file.md`
2. Type `@c:\foo` in the prompt
3. Autocomplete suggests `@c:\foo bar\` (a folder with a space in its name)
4. Press Tab to complete the path segment
5. Press Backspace to remove [the space](https://github.com/github/copilot-cli/issues/2429) and continue navigating

### Expected behavior

Autocomplete continues showing the folder's contents, allowing further navigation into the folder (e.g., to select `file.md`).

### Actual behavior

The autocomplete menu disappears and path resolution stops. The space in "foo bar" terminates autocomplete for the @ file reference. There appears to be no way to use autocomplete to navigate into files inside directories whose names contain spaces. (Quoting the path from the beginning doesn't trigger autocomplete at all.)

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

Reproduce the issue in GitHub Copilot CLI 1.0.27 using an @ reference to c:\foo bar\file.md, then trace the @ file autocomplete and path-resolution entry points. Confirm the fix by navigating past the space with Tab and Backspace until file.md is suggested, while preserving the documented behavior for paths without spaces.

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。