Giter Club home page Giter Club logo

Comments (6)

joefiorini avatar joefiorini commented on June 18, 2024 2

@chemzqm I'm finally getting around to playing with this fix and noticing that it still doesn't seem to work. For example, if I run:

CocList grep packages/some-package

I would expect, based on what you said, that it would limit the search to the packages/some-package folder. Instead, the list is prepopulated with results for packages/some-package. The problem, I suspect, is because grep, ag & rg expect the path to be the last positional param, but since the search pattern comes before it I can't prepopulate the command with the path. It seems like having a way to write a custom command that can inject the input (ie. replace %I with the input if it exists) would allow for this. Is there some other way to do this that I'm missing?

from coc-lists.

chemzqm avatar chemzqm commented on June 18, 2024

There is -folder support, check help.

from coc-lists.

joefiorini avatar joefiorini commented on June 18, 2024

@chemzqm I did check help, a number of times, and I tried a couple different ways to pass a specific folder and none of them worked. I even looked at the source code implementation of -folder. My interpretation from doing all that is that -folder searches from the workspace root. That is different than what I am talking about here. I mean to pass a specific folder to grep so I could implement, for example, a shortcut to search in the folder of the file in the current buffer. Did I miss something that says coc-list grep supports this?

from coc-lists.

chemzqm avatar chemzqm commented on June 18, 2024

You should be able to pass path as last argument with rg, I've fixed it.

from coc-lists.

joefiorini avatar joefiorini commented on June 18, 2024

Wow, thanks for addressing so quickly! Will try it out later.

from coc-lists.

crmtestresco avatar crmtestresco commented on June 18, 2024

The solution can be found in the documentation
You can specify the folder like this:
:CocList grep word -- /folder/to/search/from

from coc-lists.

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.