Skip to content

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

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

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

Conversation

@wyf027

@wyf027 wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor

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

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

Fixes #1686.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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!

@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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

@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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>
@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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.

@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

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

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