branch: master
commit 1914ecd358f9617a973bb1d2cb47290c9af0e84d
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-recoll-function): Add shell-quote-argument
    
    Fixes #713
---
 counsel.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index e17abeb..0bffdca 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1828,11 +1828,12 @@ the command."
 
 ;;** `counsel-recoll'
 (defun counsel-recoll-function (string)
-  "Grep in the current directory for STRING."
+  "Run recoll for STRING."
   (if (< (length string) 3)
       (counsel-more-chars 3)
     (counsel--async-command
-     (format "recoll -t -b '%s'" string))
+     (format "recoll -t -b %s"
+             (shell-quote-argument string)))
     nil))
 
 ;; This command uses the recollq command line tool that comes together

Reply via email to