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

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

[elpa] master 8fccfd3 03/54: (counsel-locate): Support OS X


From: Oleh Krehel
Subject: [elpa] master 8fccfd3 03/54: (counsel-locate): Support OS X
Date: Tue, 29 Sep 2015 14:09:47 +0000

branch: master
commit 8fccfd3b69e844d5fdd84b0499d4660f6147bb0d
Author: Chunyang Xu <address@hidden>
Commit: Chunyang Xu <address@hidden>

    (counsel-locate): Support OS X
    
    - OS X "open" is the equivalent to "xdg-open"
    - OS X "locate" doesn't support "--regex"
---
 counsel.el |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 186b63c..0d75da1 100644
--- a/counsel.el
+++ b/counsel.el
@@ -444,7 +444,11 @@ Skip some dotfiles unless `ivy-text' requires them."
   (call-process shell-file-name nil
                 nil nil
                 shell-command-switch
-                (format "xdg-open %s" (shell-quote-argument x))))
+                (format "%s %s"
+                        (if (eq system-type 'darwin)
+                                    "open"
+                                  "xdg-open")
+                        (shell-quote-argument x))))
 
 (declare-function dired-jump "dired-x")
 (defun counsel-locate-action-dired (x)
@@ -454,7 +458,9 @@ Skip some dotfiles unless `ivy-text' requires them."
 (defvar counsel-locate-history nil
   "History for `counsel-locate'.")
 
-(defcustom counsel-locate-options '("-i" "--regex")
+(defcustom counsel-locate-options (if (eq system-type 'darwin)
+                                      '("-i")
+                                    '("-i" "--regex"))
   "Command line options for `locate`."
   :group 'ivy
   :type  '(repeat string))



reply via email to

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