summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-11-16 18:40:57 -0500
committerKyle Meyer <kyle@kyleam.com>2016-11-16 18:40:57 -0500
commitdf85ce1b98a18cffd7e1e2eda285daa9f8803244 (patch)
treead1d926c269c091112cfc119c79c9781f469d534
parenta3be318dd49b59397eca5de837307bf34169888e (diff)
downloademacs.d-df85ce1b98a18cffd7e1e2eda285daa9f8803244.tar.gz
Rewrite dired-omit-files with rx
-rw-r--r--init.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/init.el b/init.el
index e7b8dc1..35ed561 100644
--- a/init.el
+++ b/init.el
@@ -1319,10 +1319,13 @@
;; seems to only be taken into account if a non-exension part
;; exists.
(setq dired-omit-files
- (concat dired-omit-files
- "\\|^\\.git$\\|^\\.gitignore$"
- "\\|^__pycache__$\\|^\\.snakemake$"
- "\\|.Rhistory"))
+ (rx (or (and bol (zero-or-one ".") "#")
+ (and bol "." (zero-or-one ".") eol)
+ (and bol ".git" eol)
+ (and bol ".gitignore" eol)
+ (and bol "__pycache__" eol)
+ (and bol ".Rhistory" eol)
+ (and bol ".snakemake" eol))))
(setq dired-omit-extensions
(append dired-omit-extensions