[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c19c5ed 3/8: counsel.el (counsel-git): Switch to action-st
From: |
Oleh Krehel |
Subject: |
[elpa] master c19c5ed 3/8: counsel.el (counsel-git): Switch to action-style call |
Date: |
Sat, 23 May 2015 11:31:02 +0000 |
branch: master
commit c19c5ede8bd44bc40d1c207083974c716f93aee6
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-git): Switch to action-style call
This allows "C-M-n" and "C-M-p" to be used.
Re #114
---
counsel.el | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/counsel.el b/counsel.el
index 2fce67f..fb831ae 100644
--- a/counsel.el
+++ b/counsel.el
@@ -167,16 +167,15 @@
(defun counsel-git ()
"Find file in the current Git repository."
(interactive)
- (let* ((default-directory (locate-dominating-file
- default-directory ".git"))
- (cands (split-string
- (shell-command-to-string
- "git ls-files --full-name --")
- "\n"
- t))
- (file (ivy-read "Find file: " cands)))
- (when file
- (find-file file))))
+ (ivy-read "Find file: "
+ (let ((default-directory (locate-dominating-file
+ default-directory ".git")))
+ (split-string
+ (shell-command-to-string
+ "git ls-files --full-name --")
+ "\n"
+ t))
+ :action (lambda () (find-file ivy--current))))
(defvar counsel--git-grep-dir nil
"Store the base git directory.")
- [elpa] master updated (08e02f3 -> 740b7e6), Oleh Krehel, 2015/05/23
- [elpa] master 4b505da 2/8: ivy.el (ivy-completing-read): Check for a cons initial-input, Oleh Krehel, 2015/05/23
- [elpa] master c19c5ed 3/8: counsel.el (counsel-git): Switch to action-style call,
Oleh Krehel <=
- [elpa] master 57ca591 1/8: * swiper/ivy.el: Clean up regexps and pseudo-closures, Oleh Krehel, 2015/05/23
- [elpa] master 69491ad 4/8: Fixup "C-u C-j" for `ivy-switch-buffer', Oleh Krehel, 2015/05/23
- [elpa] master 9e5e52b 6/8: README.md: Add a secion on Ivy, Oleh Krehel, 2015/05/23
- [elpa] master 3c098bd 5/8: The :action parameter to ivy-read should take one arg, Oleh Krehel, 2015/05/23
- [elpa] master e084b5d 7/8: swiper.el: Bump version, Oleh Krehel, 2015/05/23
- [elpa] master 740b7e6 8/8: Merge commit 'e084b5d9feab3dd1246e51ce1fddde3db6024f7d' from swiper, Oleh Krehel, 2015/05/23