                 (regex (counsel-unquote-regex-parens
                         (setq ivy--old-re
                               (ivy--regex string)))))
-            (counsel--async-command (format base-cmd regex))
+            (spacemacs//counsel-async-command (format base-cmd regex))
             nil)))))
 
   ;; see `counsel-ag'

  (defvar spacemacs--counsel-search-max-path-length 30
    "Truncate the current path in counsel search if it is longer
than this amount.")

  ;; see `counsel-ag-function'
  (defun spacemacs//make-counsel-search-function (tool)

            (or initial-directory
                (read-directory-name "Start from directory: ")))
      (ivy-read
       (concat "%-5d "
               (format "%s from [%s]: "
                       tool
                       (if (< (length counsel--git-grep-dir)
                              spacemacs--counsel-search-max-path-length)
                           counsel--git-grep-dir
                         (concat
                          "..." (substring counsel--git-grep-dir
                                           (- (length counsel--git-grep-dir)
                                              spacemacs--counsel-search-max-path-length)
                                           (length counsel--git-grep-dir))))))
       (spacemacs//make-counsel-search-function tool)
       :initial-input initial-input
       :dynamic-collection t
