Code Monkey home page Code Monkey logo

Comments (5)

kawing-chiu avatar kawing-chiu commented on June 5, 2024 1

Ack is my choice of vim's grepprg. I use the -x option so that I can use other program to narrow down what to search first. In a large project, searching directly on a raw directory is infeasible. For example, my python project has a lot of cython-generated .c files in the src directory that I never want to touch. So my grepprg looks like:

let &grepprg = 'git ls-files -co --exclude-standard -z \| xargs -0 ls -d 2>/dev/null \| ack -x'

I do similar thing to other search-related plugins like ctrl-p, too. Don't know whether this is the correct way, though.

from ack2.

petdance avatar petdance commented on June 5, 2024

That's frustrating. :-/ Thanks for reporting it.

But I'm glad to see folks using the -x switch!

from ack2.

kawing-chiu avatar kawing-chiu commented on June 5, 2024

Thanks for the prompt reply! For the time being, here's a workaround I use:

$ echo not_exist | xargs ls -d 2>/dev/null | ack -x some_pattern

from ack2.

petdance avatar petdance commented on June 5, 2024

I'll fix it in ack itself. I don't think it will be that big of a deal.

While I have your attention, can you tell me more about how you're using -x? I rarely see people mention it, and it's one of my favorite features. Did you just stumble across it in the docs and think "Hey, that's handy"?

from ack2.

petdance avatar petdance commented on June 5, 2024

This has been fixed in ack3. There will be no more releases of ack 2.

from ack2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.