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 support to ignore filenames (by regex?) #47

Open
EricCrosson opened this issue Dec 30, 2020 · 1 comment
Open

Add support to ignore filenames (by regex?) #47

EricCrosson opened this issue Dec 30, 2020 · 1 comment
Assignees

Comments

@EricCrosson
Copy link

EricCrosson commented Dec 30, 2020

Use case:

Sometimes I want to do an ambitious search or search/replace but I get a bunch of junk files I don't want to touch, like a CHANGELOG.md or a package-lock.json.

It would be nice to add an argument to ambs/ambr to ignore these files, e.g.

ambs --ignore-file '*.md' --ignore-file '*-lock.json' searchString

and

ambr --ignore-file '*-lock.json' fromString toString

The current workarounds I've been using are grep -v and trying to manually select 'no' on the replace query for the files I don't want to replace text inside. I can assure you, this is a very error prone process 😅

@gf3
Copy link

gf3 commented May 20, 2022

I'm running into the same issue, too. I'd like to be able to either ignore matching files or only include matching files.

For example I have a directory with a pattern like so:

.
├── account.go
├── account.repo.go
├── account.service.go
├── account_test.go
├── address.go
└── address_test.go

And I'd like to be able to call ambr on only the files ending with _test.go (or vice versa).

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

No branches or pull requests

3 participants