gitui-org / gitui-org/gitui

Feature Request: Built-in text/content search across files

Đang mở
#2,964 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
22.5k
Fork
773
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Feature Request

**Summary:**
GitUI currently does not provide a built-in way to search for text or content across files in a repository. Users who want to find a specific string, pattern, or piece of code must leave the GitUI interface and use an external tool (e.g. `grep`, `rg`, or their editor's search).

**Expected Behavior:**
GitUI should include a built-in file content search (similar to `grep` / `ripgrep`) that allows users to:
- Enter a search query (plain text or regex)
- See matching files and line previews directly within the TUI
- Navigate to a specific match in context

**Why This Matters:**
Code review and diff inspection workflows often require looking up where a symbol or string is used across the repository. Having to switch out of GitUI to a separate terminal search breaks the flow and reduces the tool's usefulness as a self-contained Git UI.

**Possible Approach:**
- Add a dedicated search panel (e.g. reachable via a keybinding like `/` or a dedicated shortcut)
- Internally delegate to `git grep` or an optional `ripgrep`/`grep` backend
- Display results in a scrollable list with file path, line number, and a snippet of the matching line
- Allow jumping into the diff/file view from a result

**Alternatives Considered:**
- Using `git grep` manually in a separate terminal — works but requires context switching
- Using editor search — not available when GitUI is the primary interface

**References:**
- Similar feature in other TUI Git clients (e.g. lazygit's filter/search capabilities)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Chưa xác định được tệp hoặc bài kiểm thử nào; hãy bắt đầu bằng cách kiểm tra các điểm vào TUI hiện có cho các phím tắt, panel và chế độ xem diff/tệp. Xác định panel tìm kiếm xoay quanh phím tắt `/` được đề xuất và đánh giá `git grep` hoặc backend ripgrep/grep tùy chọn. Được xem là hoàn thành khi người dùng có thể truy vấn văn bản hoặc regex, duyệt các đường dẫn tệp kèm bản xem trước dòng và chuyển đến một kết quả khớp trong ngữ cảnh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, rust
Lĩnh vực
cli, devtools, search
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
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
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.