Open redguardtoo opened 6 years ago
counsel-grep
does not work
Please elaborate on the issue with steps to reproduce, etc. as that gives nothing to go on.
The other commands currently hardcode the ivy--regex
regexp builder; perhaps it's possible to lift this restriction, but keep in mind that there will always be discrepancies between Emacs and external regexp syntax to some extent.
there will always be discrepancies between Emacs and external regexp syntax to some extent
Most external tools don't support negative patterns. We could fix this by either doing the negative match filtering in Emacs, or tailoring each shell command by appending grep -v
.
@abo-abo Indeed, that's what I meant by "perhaps it's possible to lift this restriction", i.e. allow more flexible interaction with external utilities. My comment about the regexp syntax discrepancies was more theoretical / philosophical and, thus, of little use. :)
@abo-abo , we can use both solution, if grep
exists use it, else use elisp.
@redguardtoo
if
grep
exists use it
Isn't that the whole point of counsel-grep
vs, say, counsel-grep-or-swiper
or swiper
?
counsel-grep
,counsel-git-grep
,counsel-ag
, andcounsel-rg
fail when input negative keywords ("keyword1 !keyword2", for example).Tested on ivy
v0.10.0
, Emacs 25.3Steps to reproduce:
git clone https://github.com/redguardtoo/emacs.d.git
init-evil.el
, runcounsel-grep
, inputevil !search
in ivy input, got INCORRECT 0 candidates,counsel-git-grep
, inputevil !search
, got 0 candidatesinit-evil.el
, runcounsel-ag
, inputevil !search
, got 0 candidatesinit-evil.el
, runcousnel-rg
, inputevil !search
, got 0 candidates