emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 05d5e63 02/54: (counsel-locate): Allow customizing locate


From: Oleh Krehel
Subject: [elpa] master 05d5e63 02/54: (counsel-locate): Allow customizing locate options
Date: Tue, 29 Sep 2015 14:09:46 +0000

branch: master
commit 05d5e634edcf13526917b89efb2e631b87342802
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    (counsel-locate): Allow customizing locate options
---
 counsel.el |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/counsel.el b/counsel.el
index 63c9552..186b63c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -454,6 +454,11 @@ Skip some dotfiles unless `ivy-text' requires them."
 (defvar counsel-locate-history nil
   "History for `counsel-locate'.")
 
+(defcustom counsel-locate-options '("-i" "--regex")
+  "Command line options for `locate`."
+  :group 'ivy
+  :type  '(repeat string))
+
 (ivy-set-actions
  'counsel-locate
  '(("x" counsel-locate-action-extern "xdg-open")
@@ -463,7 +468,10 @@ Skip some dotfiles unless `ivy-text' requires them."
   (if (< (length str) 3)
       (counsel-more-chars 3)
     (counsel--async-command
-     (concat "locate -i --regex " (ivy--regex str)))
+     (concat "locate "
+            (mapconcat #'identity counsel-locate-options " ")
+            " "
+            (ivy--regex str)))
     '("" "working...")))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]