[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32549: Allow passing custom options to vc-git-grep

From: Noam Postavsky
Subject: bug#32549: Allow passing custom options to vc-git-grep
Date: Tue, 28 Aug 2018 19:14:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Federico Tedin <address@hidden> writes:

> (let ((current-prefix-arg '(4)))
>   (vc-git-grep "something" "*.el" "."))
> And then I also tried:
> (let ((current-prefix-arg '(4)))
>   (projectile-grep))
> In both cases, I am prompted for the full git-grep command (and
> nothing else).

Doesn't projectile-grep prompt you for a regexp?  I don't have it
installed here, but it looks like you have to pass a non-nil ARG to get
prompted for filenames, i.e.,

  (let ((current-prefix-arg '(4)))
    (projectile-grep nil t))

> Is there any way to set a default set of arguments in order to avoid
> typing them when invoking the function?

Not sure I follow, when you pass "something" and "*.el" to the function,
those get inserted into the default command so you don't have to type
them interactively.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]