Skip to content

docs: clarify --full-path help text (fixes #1686)#1997

Open
leno23 wants to merge 4 commits into
sharkdp:masterfrom
leno23:docs/clarify-full-path-help-1686
Open

docs: clarify --full-path help text (fixes #1686)#1997
leno23 wants to merge 4 commits into
sharkdp:masterfrom
leno23:docs/clarify-full-path-help-1686

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 16, 2026

Summary

Clarifies --full-path / -p documentation so users understand:

  • By default, patterns match the last path component (not "filename only" / ambiguous "full path").
  • With -p, patterns match the absolute path (not a relative path from the search root).

Updates src/cli.rs, doc/fd.1, README.md (prose + --help snapshot), zsh completion, and an internal comment in src/config.rs.

Fixes #1686.

Context

Follows feedback on #1996 from @tmccombs:

Checks

  • cargo fmt -- --check
  • cargo clippy --all-targets --all-features -- -Dwarnings
  • cargo test --locked

Made with Cursor

Use "absolute path" for -p matching and "last path component" for the
default, across CLI help, man page, README, and shell completion.

Fixes sharkdp#1686.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Hi maintainers — gentle ping on this docs-only PR.

It addresses #1686 and incorporates the review feedback from #1996 (@tmccombs): use absolute path for -p matching and last path component for the default (see also #839).

All CI checks are green on my side. Happy to tweak wording or close this in favor of #1996 if you prefer that PR updated instead.

Thanks!

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Gentle ping — docs-only PR, all CI green. Ready for review when you have a moment. Thanks!

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Still green and ready for review. Happy to adjust wording if needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Added regression test test_full_path_help_text (checks fd -h for the updated -p help line).

CI re-running on the latest push — still ready for review. Thanks!

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Pushed a follow-up: test_full_path_help_text now resolves the fd binary the same way as other integration tests (CARGO_BIN_EXE_fd env var with env!("CARGO_BIN_EXE_fd") fallback), fixing the MSRV job. CI is green on my side.

leno23 added a commit to leno23/fd that referenced this pull request May 16, 2026
…1997

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

Friendly ping — CI green, incorporates feedback from #1996 review. Ready when you have time. Thanks!

leno23 added a commit to leno23/fd that referenced this pull request May 16, 2026
Scope this branch to -e/--extension only (sharkdp#1693). Full-path help
clarifications remain in sharkdp#1997.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread tests/tests.rs

/// Help text for `--full-path` should not use ambiguous wording (#1686)
#[test]
fn test_full_path_help_text() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a test for the help text

@tmccombs
Copy link
Copy Markdown
Collaborator

probably also worth adding an entry to the changelog

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.

[BUG] The help page is confusing for --full-path option

2 participants