OS X users might want to use `mdfind` instead of `locate`. The added function `counsel-locate-cmd-mdfind` can be used to accomplish that.
: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
(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)