Skip to content

docs: clarify -r replacement flag - #3500

Open
rakhimovv wants to merge 1 commit into
BurntSushi:masterfrom
rakhimovv:docs/clarify-r-replacement
Open

docs: clarify -r replacement flag#3500
rakhimovv wants to merge 1 commit into
BurntSushi:masterfrom
rakhimovv:docs/clarify-r-replacement

Conversation

@rakhimovv

Copy link
Copy Markdown

Kept typing rg -rn PATTERN out of grep habit, expecting recursive search with line numbers — but ripgrep reads -r as --replace and swaps every match for the literal n. Recursion is already the default. This change just documents that gotcha in the guide and the --replace help, with contrasting examples. No behavior change. Validated with formatting checks, 118 binary tests, 10 replacement integration tests, and by generating and inspecting the help/man output.

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.

1 participant