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

Support both [^...] and [!...] for globset class negation #668

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

okdana
Copy link
Contributor

@okdana okdana commented Nov 9, 2017

Fixes #663.

I hope this is the idiomatic way to do this. Seems to work at least:

% ls
abc  bbc  cbc  dbc

# Old behaviour
% \rg -u --files -g '[!ab]bc'
cbc
dbc
% \rg -u --files -g '[^ab]bc'
abc
bbc

# New behaviour
% rg-dev -u --files -g '[!ab]bc'
cbc
dbc
% rg-dev -u --files -g '[^ab]bc'
cbc
dbc

For the tests i just duplicated a bunch of the ones that were there for [!...] 🤷‍♀️

@okdana
Copy link
Contributor Author

okdana commented Nov 9, 2017

Oops. Forgot to bump the globset version used by ignore. Pushing fix now....

Does the ignore version need changed too?

Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

@okdana This looks great! The implementation itself is fine, and while I appreciate bumping the version, could you actually remove that part of the PR? I usually take care of version bumping whenever I do the next release. And yeah, ignore and ripgrep itself technically need semver bumps as well. (Which is fine.)

Adds support for [^...] class negation in globs for parity with git, &al.

Fixes BurntSushi#663
@okdana
Copy link
Contributor Author

okdana commented Nov 16, 2017

Oh, sure. Done, rebased

Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Awesome thank you! :-)

@BurntSushi BurntSushi merged commit 679198e into BurntSushi:master Nov 22, 2017
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.

None yet

2 participants