Skip to content

Allow stripping cwd prefix with explicit search paths - #2124

Open
pederbe wants to merge 1 commit into
sharkdp:masterfrom
pederbe:learn/2113-strip-prefix-search-paths
Open

Allow stripping cwd prefix with explicit search paths#2124
pederbe wants to merge 1 commit into
sharkdp:masterfrom
pederbe:learn/2113-strip-prefix-search-paths

Conversation

@pederbe

@pederbe pederbe commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • Allow --strip-cwd-prefix with positional paths and --search-path by removing the argument conflicts and limiting the no-search-path check to auto mode.
  • Default, auto, never, and dash-filename protection retain their behavior. Add --strip-cwd-prefix to the issue's command to get fileA and b/c/fileC.
  • Updated long help, manual, and changelog. Corrected the manual's inverted description of auto mode.

Fixes #2113

Testing

  • Regression exercises both path syntaxes, all modes, print0, mixed roots, and a dash filename. Failed before the fix on the argument conflict, passed after it.
  • cargo test --locked: 147 unit tests and 95 integration tests passed on Windows GNU.
  • cargo fmt --all --check passed after formatting.
  • cargo clippy --locked --all-targets --all-features -- -D warnings failed on two existing dead-code warnings in tests/testenv/mod.rs. With -A dead-code appended, passed.

AI assistance

I used Codex to assist coding and testing. I personally reviewed all work and verified testing.

@pederbe
pederbe marked this pull request as ready for review September 6, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output base dir content without ./ prefix when multiple search paths are used

1 participant