feat(paths): implement scope-based path display resolution#7
Open
feat(paths): implement scope-based path display resolution#7
Conversation
- Add PathDisplay enum (Relative/Absolute) to control path output format - Refactor effective_path_display() in CLI to use user-provided scopes only - Update core to use resolved display path through SearchLineStyle.path_display - Unified path printing in execute.rs via display_path_for_candidate() - Update StandardSink to store String display_path instead of &Path - Fix integration tests to expect correct absolute/relative paths - Update rg-compat-matrix.md to reflect implemented status - No runtime rg dependency in tests; use ripgrep clone as manual reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements proper path display resolution based on user-provided search scopes, addressing the "Default path printing" partial row in the rg compatibility matrix.
PathDisplayenum (Relative/Absolute) to control path output formateffective_path_display()in CLI to use user-provided scopes onlySearchLineStyle.path_displayexecute.rsviadisplay_path_for_candidate()StandardSinkto storeStringdisplay_path instead of&Pathrg-compat-matrix.mdto reflect implemented statusrgdependency in tests; use ripgrep clone as manual referenceBehavior
sift pattern /tmp/foo), paths are printed absolutesift pattern ./fooor justsift pattern), paths are printed relativeTesting
cargo fmt --checkpassescargo clippy -D warningspasses