diff --git a/README.md b/README.md index 6686e59..d58975f 100644 --- a/README.md +++ b/README.md @@ -478,6 +478,7 @@ rnr -f '(\w+)-(\d+).(\w+)' '${2}-${1}.${3}' ./* ├── 02-file.txt └── 03-file.txt ``` +__SHELL NOTE:__ In shells like Bash and zsh, make sure to wrap the `REPLACEMENT` pattern in single quotes. Otherwise, capture group indices will be replaced by expanded shell variables. #### Capture several named groups and swap them 1. Capture two digits as `number`. 2. Capture extension as `ext`. diff --git a/src/app.rs b/src/app.rs index dfe645d..7a19075 100644 --- a/src/app.rs +++ b/src/app.rs @@ -88,7 +88,7 @@ pub fn create_app<'a>() -> App<'a, 'a> { ) .arg( Arg::with_name("REPLACEMENT") - .help("Expression replacement") + .help("Expression replacement (use single quotes for capture groups)") .required(true) .validator_os(is_valid_string) .index(2),