github / github/copilot-cli

Include range line detection with : instead of only -.

未關閉
#3,317 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
area:non-interactive area:tools
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

Some IDEs like Zed use a colon for range lines (e.g., L25:30), whereas Copilot only accepts hyphens (e.g., L25-30). Please add support for colon-based range recognition.

### Proposed solution

Supporting colon-based line ranges (e.g., L25:30) would provide the following benefits:
- Improved IDE Interoperability: Modern editors like Zed and certain terminal emulators use the file:line:column or Lstart:end convention as a standard. Supporting this would allow users to copy-paste line references directly from their editor into the CLI without manual editing.
- Reduced Friction & Better UX: Currently, users coming from environments that default to colons face a "syntax error" or ignored input when they use their habitual formatting. Adding : as a recognized separator makes the tool more intuitive and "just works."
- Consistency with POSIX and LSP Standards: Many developer tools and Language Server Protocol (LSP) outputs use colons to denote ranges. Aligning Copilot CLI with these existing ecosystems ensures it feels like a native part of the modern developer's toolkit.
- Wider Adoption: By removing small but repetitive manual tasks (like changing a : to a -), you lower the barrier to entry for power users who rely on fast, CLI-based workflows.

### Example prompts or workflows

```json
{
"sessionId": "c9b.....9b",
"prompt": [
{
"type": "resource",
"resource": {
"text": "

\n \n
\n",
"uri": "file:///.../page.tsx#L6:8"
}
},
{
"type": "text",
"text": " This line starts from where to where?"
}
]
}
```

### Additional context

selected line in zed not readable by agent

Image

貢獻指南

開啟貢獻指南

研究方向

首先定位用於識別檔案行範圍的 CLI 程式碼,以及涵蓋 L25-30 這類帶連字號參照的所有測試。檢查 file:///.../page.tsx#L6:8 這類資源 URI 的解析方式,然後在保留現有行為的同時,為以冒號分隔的範圍新增涵蓋。完成的標準是接受冒號形式,且相關測試通過。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。