@@ -114,28 +114,26 @@ convenient to use a simple boolean value here."
114
114
(defun helm-ff--setup-boring-regex (var val )
115
115
(set var val)
116
116
(setq helm-ff--boring-regexp
117
- (cl-loop with last = (car (last val))
118
- for r in (butlast val)
119
- if (string-match " \\ $\\ '" r)
120
- concat (concat r " \\ |" ) into result
121
- else concat (concat r " $\\ |" ) into result
122
- finally return
123
- (concat result last
124
- (if (string-match " \\ $\\ '" last ) " " " $" )))))
117
+ (cl-loop for r on val
118
+ if (cdr r)
119
+ concat (concat (car r) " \\ |" )
120
+ else concat (car r))))
125
121
126
122
(defcustom helm-boring-file-regexp-list
127
123
(mapcar (lambda (f )
128
124
(let ((rgx (regexp-quote f)))
129
125
(if (string-match-p " [^/]$" f)
130
126
; ; files: e.g .o => \\ .o$
131
127
(concat rgx " $" )
132
- ; ; directories: e.g .git/ => \.git\\ (/\\ |$\\ )
133
- (concat (substring rgx 0 -1 ) " \\ (/\\ |$\\ )" ))))
128
+ ; ; To not ignore files with same prefix as directory names
129
+ ; ; (bug#2009) use e.g. .git/ => \.git\?$.
130
+ ; ; See also PR in bug#2012.
131
+ (concat rgx " ?$" ))))
134
132
completion-ignored-extensions)
135
133
" A list of regexps matching boring files.
136
134
137
135
This list is build by default on `completion-ignored-extensions' .
138
- The directory names should end with \" /?\" e.g. \" \\ .git/?\" and
136
+ The directory names should end with \" /?$ \" e.g. \" \\ .git/?$ \" and
139
137
the file names should end with \" $\" e.g. \" \\ .o$\" .
140
138
141
139
These regexps may be used to match the entire path, not just the
0 commit comments