[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c38daa3 039/399: Enable counsel-read-env to work in read-f
From: |
Oleh Krehel |
Subject: |
[elpa] master c38daa3 039/399: Enable counsel-read-env to work in read-file-name |
Date: |
Sat, 20 Jul 2019 14:56:44 -0400 (EDT) |
branch: master
commit c38daa31d8aafd4f17226dd6f505b256d1105022
Author: CeleritasCelery <address@hidden>
Commit: Oleh Krehel <address@hidden>
Enable counsel-read-env to work in read-file-name
---
counsel.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index 6521ddd..1b4133c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1748,7 +1748,6 @@ currently checked out."
(define-key map (kbd "C-DEL") 'counsel-up-directory)
(define-key map (kbd "C-<backspace>") 'counsel-up-directory)
(define-key map (kbd "C-M-y") 'counsel-yank-directory)
- (define-key map "$" 'counsel-read-env)
map))
(defun counsel-yank-directory ()
@@ -1897,7 +1896,8 @@ Skip some dotfiles unless `ivy-text' requires them."
"Read a file path environment variable and insert it into the
minibuffer."
(interactive)
- (if (equal ivy-text "")
+ (if (and ivy--directory
+ (equal ivy-text ""))
(let* ((cands (cl-loop for pair in process-environment
for (var val) = (split-string pair "=" t)
if (and val (not (equal "" val)))
@@ -1916,6 +1916,8 @@ minibuffer."
(ivy--cd-maybe))
(insert last-input-event)))
+(define-key ivy-minibuffer-map "$" 'counsel-read-env)
+
(defun counsel-find-file-action (x)
"Find file X."
(with-ivy-window
- [elpa] master dfeaec0 029/399: swiper.el (swiper--update-input-ivy): Don't rely on window-start in terminal, (continued)
- [elpa] master dfeaec0 029/399: swiper.el (swiper--update-input-ivy): Don't rely on window-start in terminal, Oleh Krehel, 2019/07/20
- [elpa] master 9718962 030/399: Add a simple initial counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master ef78fb6 032/399: Add environment variable completion to counsel-find-file, Oleh Krehel, 2019/07/20
- [elpa] master 22fca55 035/399: counsel.el (counsel-file-jump-args): Remove extra backslash, Oleh Krehel, 2019/07/20
- [elpa] master 16367fc 033/399: ivy.el (ivy-call): Call ivy-recursive-restore even if no action, Oleh Krehel, 2019/07/20
- [elpa] master a664943 043/399: BSDs should default to locate not using regular expressions, Oleh Krehel, 2019/07/20
- [elpa] master bedeb02 040/399: Move counsel-read-env to ivy mode, Oleh Krehel, 2019/07/20
- [elpa] master 2a02343 036/399: counsel.el (counsel-file-jump): Fix file expansion, Oleh Krehel, 2019/07/20
- [elpa] master f0b2bc6 037/399: Update ivy-help.org, Oleh Krehel, 2019/07/20
- [elpa] master da9d937 041/399: ivy.el (ivy-call): Allow ivy-inhibit-action to be a function, Oleh Krehel, 2019/07/20
- [elpa] master c38daa3 039/399: Enable counsel-read-env to work in read-file-name,
Oleh Krehel <=
- [elpa] master e88c7d6 044/399: counsel.el (counsel-locate-cmd): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 51c5874 042/399: counsel.el (counsel-find-file-map): Bind "`" to bookmarks, Oleh Krehel, 2019/07/20
- [elpa] master 3de074a 049/399: counsel.el (counsel-find-file-copy): Add and bind., Oleh Krehel, 2019/07/20
- [elpa] master a538df1 053/399: ivy.el (ivy-make-magic-action): Point doc to the action function, Oleh Krehel, 2019/07/20
- [elpa] master 84b5ece 050/399: counsel.el (counsel-find-file-copy): Use ivy-inhibit-action, Oleh Krehel, 2019/07/20
- [elpa] master 9e3c855 052/399: ivy.el (ivy-make-magic-action): Fix bug, Oleh Krehel, 2019/07/20
- [elpa] master 9cf3f08 045/399: swiper.el (swiper-use-visual-line-p): New variable, Oleh Krehel, 2019/07/20
- [elpa] master 15e2c88 051/399: Restore buffer-list after counsel-switch-buffers, Oleh Krehel, 2019/07/20
- [elpa] master 80d40e4 046/399: Dynamically handle grep tool look-arounds, Oleh Krehel, 2019/07/20
- [elpa] master 0a4ad42 047/399: ivy-test.el (counsel--grep-regex): Add test for negative lookahead, Oleh Krehel, 2019/07/20