[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 88169a3 147/272: "C-x C-f" can un-ignore dotfiles with a l
From: |
Oleh Krehel |
Subject: |
[elpa] master 88169a3 147/272: "C-x C-f" can un-ignore dotfiles with a leading dot input |
Date: |
Mon, 25 Apr 2016 10:13:22 +0000 |
branch: master
commit 88169a3647a395712a0a79a3952249bd010551e5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
"C-x C-f" can un-ignore dotfiles with a leading dot input
* counsel.el (counsel-find-file-ignore-regexp): Add a recommended value,
all dotfiles.
(counsel--find-file-matcher): When `ivy-text' starts with a dot, don't
use `counsel-find-file-ignore-regexp'. The generic way to do this is
with "C-c C-a" (`ivy-toggle-ignore'), but this is faster and more
convenient.
Re #408
---
counsel.el | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/counsel.el b/counsel.el
index dfe6d94..46300e9 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1001,12 +1001,20 @@ done") "\n" t)))
(defcustom counsel-find-file-ignore-regexp nil
"A regexp of files to ignore while in `counsel-find-file'.
-These files are un-ignored if `ivy-text' matches them.
-The common way to show all files is to start `ivy-text' with a dot.
-Possible value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"."
+These files are un-ignored if `ivy-text' matches them. The
+common way to show all files is to start `ivy-text' with a dot.
+
+Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\". This will hide
+temporary and lock files.
+\\<ivy-minibuffer-map>
+Choosing the dotfiles option, \"\\`\\.\", might be convenient,
+since you can still access the dotfiles if your input starts with
+a dot. The generic way to toggle ignored files is \\[ivy-toggle-ignore],
+but the leading dot is a lot faster."
:group 'ivy
:type '(choice
(const :tag "None" nil)
+ (const :tag "Dotfiles" "\\`\\.")
(regexp :tag "Regex")))
(defun counsel--find-file-matcher (regexp candidates)
@@ -1015,11 +1023,13 @@ Skip some dotfiles unless `ivy-text' requires them."
(let ((res (ivy--re-filter regexp candidates)))
(if (or (null ivy-use-ignore)
(null counsel-find-file-ignore-regexp)
- (string-match counsel-find-file-ignore-regexp ivy-text))
+ (string-match "\\`\\." ivy-text))
res
(or (cl-remove-if
(lambda (x)
- (string-match counsel-find-file-ignore-regexp x))
+ (and
+ (string-match counsel-find-file-ignore-regexp x)
+ (not (member x ivy-extra-directories))))
res)
res))))
- [elpa] master 37d52cc 120/272: swiper.el (swiper--update-input-ivy): Replace "\t", (continued)
- [elpa] master 37d52cc 120/272: swiper.el (swiper--update-input-ivy): Replace "\t", Oleh Krehel, 2016/04/25
- [elpa] master 07624b3 180/272: Fix compilation warnings, Oleh Krehel, 2016/04/25
- [elpa] master f3b2640 124/272: swiper.el (swiper--ivy): Update signature, Oleh Krehel, 2016/04/25
- [elpa] master 25e1444 257/272: ivy.el (ivy-use-ignore-default): New defcustom, Oleh Krehel, 2016/04/25
- [elpa] master c9b6e02 230/272: Make sure user keybindings are respected, Oleh Krehel, 2016/04/25
- [elpa] master 5f58f9c 262/272: counsel.el (counsel--async-sentinel): Add safeguard to time-since, Oleh Krehel, 2016/04/25
- [elpa] master e5b7218 158/272: Fix swiper not revealing org overlay when at heading body end, Oleh Krehel, 2016/04/25
- [elpa] master c24b6de 217/272: swiper.el (swiper-query-replace): Improve "M-n", Oleh Krehel, 2016/04/25
- [elpa] master c27cde2 072/272: ivy.el (ivy--reset-state): Don't deactivate region, Oleh Krehel, 2016/04/25
- [elpa] master a9205fa 232/272: counsel.el (counsel-expression-history): New command, Oleh Krehel, 2016/04/25
- [elpa] master 88169a3 147/272: "C-x C-f" can un-ignore dotfiles with a leading dot input,
Oleh Krehel <=
- [elpa] master b4b8d3e 106/272: counsel.el: Organize the file with outlines, Oleh Krehel, 2016/04/25
- [elpa] master 2905d17 153/272: doc/ivy.org: fix typos, Oleh Krehel, 2016/04/25
- [elpa] master 4c81973 181/272: counsel.el (counsel-locate-cmd-es): Fix regex, Oleh Krehel, 2016/04/25
- [elpa] master 591c8fe 167/272: ivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression, Oleh Krehel, 2016/04/25
- [elpa] master 6817381 068/272: Allow to compose static collections with `counsel--async-command', Oleh Krehel, 2016/04/25
- [elpa] master 212a4b8 098/272: Update the documentation and the manual, Oleh Krehel, 2016/04/25
- [elpa] master b400fcc 108/272: counsel.el: Shuffle functions and rename headings, Oleh Krehel, 2016/04/25
- [elpa] master 63688c6 267/272: Add a couple tests for ivy-read with alists, Oleh Krehel, 2016/04/25
- [elpa] master cf2c7bc 067/272: Modify "M-n" prediction when region is active, Oleh Krehel, 2016/04/25
- [elpa] master b3f4db7 268/272: ivy.el (ivy--format-minibuffer-line): Update, Oleh Krehel, 2016/04/25