Skip to content

Commit

Permalink
docs: expand regex syntax description in usage text for search, `…
Browse files Browse the repository at this point in the history
…searchset` & `replace`

[skip ci]
  • Loading branch information
jqnatividad committed Aug 18, 2024
1 parent e642985 commit 1754269
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/cmd/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ Usage:
qsv replace --help
replace arguments:
<pattern> Regular expression to match.
<pattern> Regular expression pattern to match. Uses Rust regex syntax.
See https://docs.rs/regex/latest/regex/index.html#syntax
or https://regex101.com with the Rust flavor for more info.
<input> The CSV file to read. If not given, reads from stdin.
<replacement> Replacement string. Set to '<NULL>' if you want to
replace matches with ''.
replace options:
Expand Down
6 changes: 6 additions & 0 deletions src/cmd/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Usage:
qsv search [options] <regex> [<input>]
qsv search --help
search arguments:
<regex> Regular expression to match. Uses Rust regex syntax.
See https://docs.rs/regex/latest/regex/index.html#syntax
or https://regex101.com with the Rust flavor for more info.
<input> The CSV file to read. If not given, reads from stdin.
search options:
-i, --ignore-case Case insensitive search. This is equivalent to
prefixing the regex with '(?i)'.
Expand Down
8 changes: 7 additions & 1 deletion src/cmd/searchset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ Usage:
qsv searchset [options] (<regexset-file>) [<input>]
qsv searchset --help
search options:
searchset arguments:
<regex> Regular expression to match. Uses Rust regex syntax.
See https://docs.rs/regex/latest/regex/index.html#syntax
or https://regex101.com with the Rust flavor for more info.
<input> The CSV file to read. If not given, reads from stdin.
searchset options:
-i, --ignore-case Case insensitive search. This is equivalent to
prefixing the regex with '(?i)'.
--literal Treat the regex as a literal string. This allows
Expand Down

0 comments on commit 1754269

Please sign in to comment.