cp-rg: search globally unignored files and dirs
This commit is contained in:
parent
caf0973939
commit
1e015c5378
1 changed files with 9 additions and 2 deletions
|
|
@ -769,7 +769,14 @@ OPTIONS, if non-nil, is a string containing additional options to
|
||||||
be passed to rg. It is read from the minibuffer if the function
|
be passed to rg. It is read from the minibuffer if the function
|
||||||
is called with a prefix argument."
|
is called with a prefix argument."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((ignored (mapconcat (lambda (i)
|
(let* ((unignored (mapconcat (lambda (i)
|
||||||
|
(concat "--glob "
|
||||||
|
(shell-quote-argument i)
|
||||||
|
" "))
|
||||||
|
(append (projectile-unignored-files-rel)
|
||||||
|
(projectile-unignored-directories-rel))
|
||||||
|
""))
|
||||||
|
(ignored (mapconcat (lambda (i)
|
||||||
(concat "--glob "
|
(concat "--glob "
|
||||||
(shell-quote-argument (concat "!" i))
|
(shell-quote-argument (concat "!" i))
|
||||||
" "))
|
" "))
|
||||||
|
|
@ -781,7 +788,7 @@ is called with a prefix argument."
|
||||||
(read-string (projectile-prepend-project-name "rg options: ")
|
(read-string (projectile-prepend-project-name "rg options: ")
|
||||||
ignored
|
ignored
|
||||||
'counsel-projectile-rg-options-history)
|
'counsel-projectile-rg-options-history)
|
||||||
(concat ignored options))))
|
(concat unignored ignored options))))
|
||||||
(counsel-rg (eval counsel-projectile-rg-initial-input)
|
(counsel-rg (eval counsel-projectile-rg-initial-input)
|
||||||
(projectile-project-root)
|
(projectile-project-root)
|
||||||
options
|
options
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue