summaryrefslogtreecommitdiff
path: root/helm-id-utils.el
diff options
context:
space:
mode:
authorChunyang Xu <xuchunyang56@gmail.com>2015-10-01 13:42:21 +0800
committerChunyang Xu <xuchunyang56@gmail.com>2015-10-01 13:47:12 +0800
commita0b0e50b63b4d2b0704d356a12a9969003714c23 (patch)
tree1cd76538f54111f703749763619396eaa7ba2079 /helm-id-utils.el
parent385879008a6cbdea8f74d0dd8f9878d8423b8f37 (diff)
Add helm-gid-program customization option
On Mac OS X, "gid" might be the name of id(1) from GNU coreutils, so add option to allow user to customize the name of gid(1).
Diffstat (limited to 'helm-id-utils.el')
-rw-r--r--helm-id-utils.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/helm-id-utils.el b/helm-id-utils.el
index 5e9fdabe..8a7bfb6b 100644
--- a/helm-id-utils.el
+++ b/helm-id-utils.el
@@ -24,6 +24,15 @@
"ID-Utils related Applications and libraries for Helm."
:group 'helm)
+(defcustom helm-gid-program "gid"
+ "Name of gid command (usually `gid').
+For Mac OS X users, if you install GNU coreutils, the name `gid'
+might be occupied by `id' from GNU coreutils, and you should set
+it to correct name (or absolute path), for example, if using
+MacPorts to install id-utils, it should be `gid32'."
+ :group 'helm-id-utils
+ :type 'file)
+
(defcustom helm-gid-db-file-name "ID"
"Name of a database file created by `mkid' command from `ID-utils'."
:group 'helm-id-utils
@@ -31,10 +40,10 @@
(defun helm-gid-candidates-process ()
(let ((proc (start-process
- "gid" nil "gid"
+ "gid" nil helm-gid-program
"-r" helm-pattern)))
(set (make-local-variable 'helm-grep-last-cmd-line)
- (format "gid -r %s" helm-pattern))
+ (format "%s -r %s" helm-gid-program helm-pattern))
(prog1 proc
(set-process-sentinel
proc (lambda (_process event)