branch: master
commit 2e3cd39834cc91db520aeb0cbaaa9db2738c78cf
Author: James Bunton <[email protected]>
Commit: Oleh Krehel <[email protected]>
Support custom command for counsel-git
Fixes #590
---
counsel.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index 04fee04..171bfd9 100644
--- a/counsel.el
+++ b/counsel.el
@@ -836,6 +836,9 @@ Describe the selected candidate."
:action #'describe-face)))
;;* Git
;;** `counsel-git'
+(defvar counsel-git-cmd "git ls-files --full-name --"
+ "Command for `counsel-git'.")
+
(defvar counsel--git-dir nil
"Store the base git directory.")
@@ -858,8 +861,7 @@ Describe the selected candidate."
counsel--git-dir))
(let* ((default-directory counsel--git-dir)
(cands (split-string
- (shell-command-to-string
- "git ls-files --full-name --")
+ (shell-command-to-string counsel-git-cmd)
"\n"
t)))
(ivy-read "Find file" cands