branch: externals/ivy-hydra
commit ea9bd067a5e52220c9cb82c61bd68aeaac8f2443
Author: Raymond Huang <[email protected]>
Commit: Oleh Krehel <[email protected]>
Encode --pcre switch correctly for ivy-occur
This fixes the way the --pcre2 switch is appended when using a PCRE
expression
for ivy-occur.
Fixes #2635
Fixes #2645 (PR)
---
counsel.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 9a26c34..481231a 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3088,10 +3088,12 @@ Works for `counsel-git-grep', `counsel-ag', etc."
(funcall cmd-template ivy-text)
(let* ((command-args (counsel--split-command-args ivy-text))
(regex (counsel--grep-regex (cdr command-args)))
+ (extra-switches (counsel--ag-extra-switches regex))
(all-args (append
(when (car command-args)
(split-string (car command-args)))
- (counsel--ag-extra-switches regex)
+ (when extra-switches
+ (split-string extra-switches))
(list
(counsel--grep-smart-case-flag)
regex))))