Help multiple values and sub-command

Hello everyone,
Im developing a pet project to learn Rust, is another find clone.....

I want to be able to find files and directories in several paths, using several patterns to search for, at the same time. Then i want to be able to perform file operations over the results. This is the code snippet that configures

fn main() {
    let app = App::new("findx")
        .about("find + directory operations utility")
                .help("Directories to search for the PATTERNS"),
                .help("Patterns to search for"),
                .about("Rename the last part element of the path")
                        .help("Append the STRING to the end of every dir/file founded"),

This is one of the execution of the program:

➜  findx git:(master) ✗ ./target/debug/findx -p ../ -t findx rename findit
paths:    ["../"]
patterns: ["findx", "rename", "findit"]

as you can see is taking the subcommand and the argument of the subcommand as values of -t.

this is with the -- "thing" between the main program and the subcommand

 findx git:(master) ✗ ./target/debug/findx -p ../ -t findx -- rename findit
error: The subcommand 'rename' wasn't recognized
        Did you mean 'rename'?

If you believe you received this message in error, try re-running with 'findx -- rename'

    findx --paths <PATHS>... --patterns <PATTERNS>...

For more information try --help

and of course that i mean rename, could someone help me with this or even at least tell me if is possible to do this with

Thanks in advance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.