Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --glob and --regex #96

Closed
wants to merge 1 commit into from
Closed

Add --glob and --regex #96

wants to merge 1 commit into from

Conversation

jakwings
Copy link
Contributor

@jakwings jakwings commented Oct 11, 2017

WIP:

ping #85

src/main.rs Outdated
} else {
match GlobBuilder::new(pattern).literal_separator(true).build() {
Ok(glob) => {
// TODO: provide an option to remove (?-u) in the upstream?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is unnecessary to match arbitrary bytes in the path, then no need to remove (?-u).

src/main.rs Outdated
match GlobBuilder::new(pattern).literal_separator(true).build() {
Ok(glob) => {
// TODO: provide an option to remove (?-u) in the upstream?
eprintln!("GLOB:{} | REGEX: {}", glob.glob(), glob.regex());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a debug print?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just to get you familiar with how --glob works.

@jakwings
Copy link
Contributor Author

Added tests for --full-path and rebased.

@jakwings
Copy link
Contributor Author

jakwings commented Oct 13, 2017

Another problem is how to apply (?s) (allow . to match newlines, "dot-all") to glob patterns.

(maybe not a problem)

@sharkdp
Copy link
Owner

sharkdp commented Oct 14, 2017

Another problem is how to apply (?s) (allow . to match newlines, "dot-all") to glob patterns.

I think we should do the same as for #111.

@jakwings
Copy link
Contributor Author

Yes, and no option to disable "dot-all" for glob patterns? I'm ok with this.

@sharkdp
Copy link
Owner

sharkdp commented Oct 14, 2017

Yes, and no option to disable "dot-all" for glob patterns? I'm ok with this.

Me too.

@jakwings
Copy link
Contributor Author

I've added some todos in the top comment.

@jakwings
Copy link
Contributor Author

Closing. I plan to do this in my private fork. Thanks for making fd. It really helps to get me familiar with Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants