]> gitweb.michael.orlitzky.com - emacs.d.git/commitdiff
.emacs: fix tab-completion for .git/ directories
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 12 Mar 2024 13:18:46 +0000 (09:18 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 12 Mar 2024 13:18:46 +0000 (09:18 -0400)
.emacs

diff --git a/.emacs b/.emacs
index 8f88dc32afca085ae71f83038cf1b8d42c2ed054..dbb5283042cb101ea1c34e56c8350aa503baa531 100644 (file)
--- a/.emacs
+++ b/.emacs
 
 ;; I want to see trailing whitespace.
 (setq-default show-trailing-whitespace t)
+
+;; Don't ignore .git directories when tab-completing filenames, for
+;; two reasons. First, it's nice to be able to tell that a directory
+;; is a git repository from the output of "ls", and giving them a .git
+;; suffix is an easy way to do that. Second, editing .git/config is
+;; the easiest way to do a lot of things in git.
+(setq completion-ignored-extensions
+      (remove ".git/" completion-ignored-extensions))