summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosmicHorror <CosmicHorrorDev@pm.me>2023-10-17 18:08:59 -0600
committerGitHub <noreply@github.com>2023-10-17 19:08:59 -0500
commit4dab4123e1e7125cff9db65dfd48da19848cb9c5 (patch)
tree68e9e526283ec4043d4898e1afa068d6f7e2d1ea
parentad7bba5ba788c772057fd5606b6b648bf94eae99 (diff)
Update --string-mode references to --fixed-strings (#240)
-rw-r--r--README.md2
-rw-r--r--src/cli.rs9
2 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 935a523..692e05c 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ Install through
## Quick Guide
-1. **String-literal mode**. By default, expressions are treated as regex. Use `-s` or `--string-mode` to disable regex.
+1. **String-literal mode**. By default, expressions are treated as regex. Use `-F` or `--fixed-strings` to disable regex.
```sh
> echo 'lots((([]))) of special chars' | sd -s '((([])))' ''
diff --git a/src/cli.rs b/src/cli.rs
index 34a2b31..b307e70 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -54,7 +54,14 @@ w - match full words only
*/
pub flags: Option<String>,
- /// The regexp or string (if -s) to search for.
+ #[arg(long, value_name = "SEPARATOR")]
+ /// Set the path separator to use when printing file paths. The default is
+ /// your platform's path separator ('/' on Unix, '\' on Windows). This flag
+ /// is intended to override the default when the environment demands it. A
+ /// path separator is limited to a single byte.
+ pub path_separator: Option<char>,
+
+ /// The regexp or string (if using `-F`) to search for.
pub find: String,
/// What to replace each match with. Unless in string mode, you may