Include range line detection with : instead of only -.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### 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": "
"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
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by locating the CLI code that recognizes file line ranges and any tests covering hyphenated references such as L25-30. Check how resource URIs like file:///.../page.tsx#L6:8 are parsed, then add coverage for colon-separated ranges while preserving existing behavior. Done means the colon form is accepted and the relevant tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100