branch: master
commit 385b8c829e92335921ae616bbf76331617801b3a
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-grep-base-command): Add --
    
    "--" signifies the end of command options.
    
    Fixes #1266
---
 counsel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 296458e..6f2342c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2264,7 +2264,7 @@ RG-PROMPT, if non-nil, is passed as `ivy-read' prompt 
argument."
    "rg -i --no-heading --line-number --color never %s ."))
 
 ;;** `counsel-grep'
-(defcustom counsel-grep-base-command "grep -nE %s %s"
+(defcustom counsel-grep-base-command "grep -nE -- %s %s"
   "Format string to use in `cousel-grep-function' to construct the command.
 
 Note: don't use single quotes for either the regex or the file name."

Reply via email to