Force counsel-rg-base-command to be a list

Counsel allows `counsel-rg-base-command' to be a string or list. This
backwards compatibility is a maintenance burden for Doom, so it's
simpler to force it to always be a list.
This commit is contained in:
Henrik Lissner 2020-06-07 13:58:06 -04:00
parent 5092bd82f9
commit 235ad55ba1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -207,6 +207,12 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
;; of its own, on top of the defaults. ;; of its own, on top of the defaults.
(setq ivy-initial-inputs-alist nil) (setq ivy-initial-inputs-alist nil)
;; REVIEW Counsel allows `counsel-rg-base-command' to be a string or list.
;; This backwards compatibility complicates things for Doom. Simpler to
;; just force it to always be a list.
(when (stringp counsel-rg-base-command)
(setq counsel-rg-base-command (split-string counsel-rg-base-command)))
;; REVIEW Fix #3215: prevents mingw on Windows throwing an error trying to ;; REVIEW Fix #3215: prevents mingw on Windows throwing an error trying to
;; expand / to an absolute path. Remove this when it is fixed upstream ;; expand / to an absolute path. Remove this when it is fixed upstream
;; in counsel. ;; in counsel.