sighol / tree-rs

MIT License
27 stars 5 forks source link

Development Roadmap #22

Open ByteBaker opened 2 months ago

ByteBaker commented 2 months ago

As part of improving tree-rs in the course of the foreseeable future, following tasks are to be completed.

@sighol please add more items that you think should be here.

ByteBaker commented 2 months ago

Hi @sighol,

I've started implementing -I, which made me realize that we may have to change the type of -P parameter as well.

According to man tree:

    -P pattern
    List only those files that match the wild-card pattern. You may have multiple -P options. <omitted the rest>

    -I pattern
    Do not list those files that match the wild-card pattern. You may have multiple -I options. See -P above for information on wildcard patterns.

Currently, include_pattern is defined as:

/// List only those files matching <`include_pattern`>
#[clap(short = 'P')]
include_pattern: Option<String>,

Which should be changed to

/// List only those files matching <`include_pattern`>
#[clap(short = 'P')]
include_pattern: Vec<String>,

What do you think? I'll define a parameter exclude_pattern for -I which will have the same signature, but will be used to exlude those that match. What do you think?

sighol commented 2 months ago

Thanks! That sounds very reasonable!