Make helm/ivy project search api more consistent

+{helm,ivy}/*-from-cwd no longer accepts a third DIRECTORY argument.
This commit is contained in:
Henrik Lissner 2018-09-08 18:20:40 -04:00
parent bd28eea778
commit 22a94fc41a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 14 deletions

View file

@ -182,9 +182,9 @@ Uses the first available search backend from `+helm-project-search-engines'. If
ALL-FILES-P (universal argument), include all files, even hidden or compressed ALL-FILES-P (universal argument), include all files, even hidden or compressed
ones, in the search." ones, in the search."
(interactive "P") (interactive "P")
(call-interactively (funcall (or (+helm--get-command "+helm/%s")
(or (+helm--get-command "+helm/%s") #'+helm/grep)
#'+helm/grep))) (or all-files-p current-prefix-arg)))
;;;###autoload ;;;###autoload
(defun +helm/project-search-from-cwd (&optional all-files-p) (defun +helm/project-search-from-cwd (&optional all-files-p)
@ -194,9 +194,9 @@ Uses the first available search backend from `+helm-project-search-engines'. If
ALL-FILES-P (universal argument), include all files, even hidden or compressed ALL-FILES-P (universal argument), include all files, even hidden or compressed
ones." ones."
(interactive "P") (interactive "P")
(call-interactively (funcall (or (+helm--get-command "+helm/%s-from-cwd")
(or (+helm--get-command "+helm/%s-from-cwd") #'+helm/grep-from-cwd)
#'+helm/grep-from-cwd))) (or all-files-p current-prefix-arg)))
;; Relative to project root ;; Relative to project root
@ -223,7 +223,7 @@ If ALL-FILES-P, search compressed and hidden files as well."
engine)) engine))
(defalias (intern (format "+helm/%s-from-cwd" engine)) (defalias (intern (format "+helm/%s-from-cwd" engine))
(lambda (all-files-p &optional query directory) (lambda (all-files-p &optional query)
(interactive "P") (interactive "P")
(+helm-file-search engine :query query :in default-directory :all-files all-files-p)) (+helm-file-search engine :query query :in default-directory :all-files all-files-p))
(format "Perform a project file search from the current directory using %s. (format "Perform a project file search from the current directory using %s.

View file

@ -314,9 +314,9 @@ Uses the first available search backend from `+ivy-project-search-engines'. If
ALL-FILES-P (universal argument), include all files, even hidden or compressed ALL-FILES-P (universal argument), include all files, even hidden or compressed
ones, in the search." ones, in the search."
(interactive "P") (interactive "P")
(call-interactively (funcall (or (+helm--get-command "+ivy/%s")
(or (+ivy--get-command "+ivy/%s") #'+ivy/grep)
#'+ivy/grep))) (or all-files-p current-prefix-arg)))
;;;###autoload ;;;###autoload
(defun +ivy/project-search-from-cwd (&optional all-files-p) (defun +ivy/project-search-from-cwd (&optional all-files-p)
@ -326,9 +326,9 @@ Uses the first available search backend from `+ivy-project-search-engines'. If
ALL-FILES-P (universal argument), include all files, even hidden or compressed ALL-FILES-P (universal argument), include all files, even hidden or compressed
ones." ones."
(interactive "P") (interactive "P")
(call-interactively (funcall (or (+helm--get-command "+ivy/%s-from-cwd")
(or (+ivy--get-command "+ivy/%s-from-cwd") #'+ivy/grep-from-cwd)
#'+ivy/grep-from-cwd))) (or all-files-p current-prefix-arg)))
;; Relative to project root ;; Relative to project root
@ -355,7 +355,7 @@ If ALL-FILES-P, search compressed and hidden files as well."
engine)) engine))
(defalias (intern (format "+ivy/%s-from-cwd" engine)) (defalias (intern (format "+ivy/%s-from-cwd" engine))
(lambda (all-files-p &optional query directory) (lambda (all-files-p &optional query)
(interactive "P") (interactive "P")
(+ivy-file-search engine :query query :in default-directory :all-files all-files-p)) (+ivy-file-search engine :query query :in default-directory :all-files all-files-p))
(format "Perform a project file search from the current directory using %s. (format "Perform a project file search from the current directory using %s.