Update +ivy*counsel-ag-function b/c of upstream changes

This commit is contained in:
Henrik Lissner 2018-01-04 03:03:32 -05:00
parent e9b5ab2385
commit 815fc6ef02
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -139,8 +139,8 @@ NOTE This may need to be updated frequently, to meet changes upstream (in
counsel-rg)." counsel-rg)."
(when (null extra-ag-args) (when (null extra-ag-args)
(setq extra-ag-args "")) (setq extra-ag-args ""))
(if (< (length string) 1) ;; #1 (if (< (length string) 1) ; <-- modified the character limit
(counsel-more-chars 1) (counsel-more-chars 1) ; <--
(let ((default-directory (ivy-state-directory ivy-last)) (let ((default-directory (ivy-state-directory ivy-last))
(regex (counsel-unquote-regex-parens (regex (counsel-unquote-regex-parens
(setq ivy--old-re (setq ivy--old-re
@ -157,10 +157,8 @@ counsel-rg)."
" -- " " -- "
(shell-quote-argument regex) (shell-quote-argument regex)
file)))) file))))
(if (file-remote-p default-directory) (counsel--async-command ag-cmd)
(split-string (shell-command-to-string ag-cmd) "\n" t) nil))))
(counsel--async-command ag-cmd)
nil)))))
;;;###autoload ;;;###autoload
(defun +ivy/wgrep-occur () (defun +ivy/wgrep-occur ()