Comments (6)
@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.
There is -folder
support, check help.
from coc-lists.
@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.
You should be able to pass path as last argument with rg, I've fixed it.
from coc-lists.
Wow, thanks for addressing so quickly! Will try it out later.
from coc-lists.
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)
- Displaying list in separate buffer HOT 1
- Missing sources migrating from denite HOT 2
- After deleting/wiping the current buffer there is an enormous padding under status line HOT 3
- Ignore .gitignore files in files list HOT 1
- Syntax highlighting doesn't work in list preview window with treesitter HOT 1
- rg 13.0.0 breaks `CocList grep` in nvim HOT 1
- `CocList mru` and `CocList mru -A` returns same result on Windows HOT 1
- 是否可以只匹配文件名而不匹配路径 HOT 1
- `:CocList grep` never loads any results when using `rg` HOT 7
- no tag files found(coc-list) HOT 1
- Sort files and mru by name like vscode
- Hide variables from outline list HOT 1
- Keep pressing <up> or <down> makes the CocList Exit and left an 'A' on the screen occasionally. HOT 2
- open error window HOT 1
- Inconsistency of searching methods. HOT 2
- search a specific folder doesn't work HOT 2
- Lists start with the last item selected HOT 1
- How to set ctrl+n and ctrl+p to up or down list? HOT 6
- helptags list doesn’t display helptags for packages added after launch HOT 2
- [grep] incorrect location when absolute path is returned HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-lists.