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

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

[elpa] master 4af5c2e 115/272: Add `counsel-locate-cmd-mdfind`


From: Oleh Krehel
Subject: [elpa] master 4af5c2e 115/272: Add `counsel-locate-cmd-mdfind`
Date: Mon, 25 Apr 2016 10:13:20 +0000

branch: master
commit 4af5c2e4e83f51da91675b0de7301b09c4b24b2c
Author: André Peric Tavares <address@hidden>
Commit: André Peric Tavares <address@hidden>

    Add `counsel-locate-cmd-mdfind`
    
    OS X users might want to use `mdfind` instead of `locate`. The added 
function `counsel-locate-cmd-mdfind` can be used to accomplish that.
---
 counsel.el |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 266746d..4b229de 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1062,7 +1062,8 @@ string - the full shell command to run."
   :group 'ivy
   :type '(choice
           (const :tag "Default" counsel-locate-cmd-default)
-          (const :tag "No regex" counsel-locate-cmd-noregex)))
+          (const :tag "No regex" counsel-locate-cmd-noregex)
+          (const :tag "mdfind" counsel-locate-cmd-mdfind)))
 
 (ivy-set-actions
  'counsel-locate
@@ -1098,6 +1099,10 @@ string - the full shell command to run."
 (defun counsel-locate-cmd-noregex (input)
   "Return a shell command based on INPUT."
   (format "locate -i '%s'" input))
+  
+(defun counsel-locate-cmd-mdfind (input)
+  "Return a shell command based on INPUT."
+  (format "mdfind -name '%s'" input))
 
 (defun counsel-locate-function (input)
   (if (< (length input) 3)



reply via email to

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