Replies: 2 comments
-
Minimal solution to have full control over (setq grep-find-ignored-files nil) This way the (defun consult--grep-exclude-args ()
"Produce grep exclude arguments.
Take the variables `grep-find-ignored-directories' and
`grep-find-ignored-files' into account."
(unless (boundp 'grep-find-ignored-files) (require 'grep))
(nconc (mapcar (lambda (s) (concat "--exclude=" s))
(bound-and-true-p grep-find-ignored-files))
(mapcar (lambda (s) (concat "--exclude-dir=" s))
(bound-and-true-p grep-find-ignored-directories)))) |
Beta Was this translation helpful? Give feedback.
0 replies
-
To elucidate my use case. I am interested in using the command as-is, such that when time comes to use the actual |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As we know, we can pass additional flags to grep inside the minibuffer of
consult-grep
e.g#gnu -- --include *md#
However,
consult-grep
by default pre-pends the following to the additional user arguements.By , default
(consult--grep-exclude-args)
includes--exclude
flags.The semantics of
--include
forgrep
is determined by if there is a--exclude
flag preceding it:When the user will try to use the
--include
flag withconsult-grep
, they will be surprised by the unexpected semantics.man grep
:Source of discussion comes from the PR:
consult-grep
to use--include
#1017One may opt to modify
consult-grep-args
to not pre-pend the--exclude
args. Though that would require knowledge of this in the first place.What shall we do about this point of confusion?
At the least, this discussion post can function as a source of information for this issue.
Beta Was this translation helpful? Give feedback.
All reactions