chiark / gitweb /
dot/profile: Force a terminal when setting `ls' colours.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 12 Jul 2024 16:44:40 +0000 (17:44 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 12 Jul 2024 16:44:40 +0000 (17:44 +0100)
I have no idea why this never bit me before.

dot/profile

index ad6deeb2850ae407b8200d13daedf6b1f291f5bb..c9eee120bf36619375bc1f68b4db662d26e9035e 100644 (file)
@@ -309,8 +309,11 @@ DEB_BUILD_OPTIONS="parallel=$(mdw-conf make-parallel 4)"
 export DEB_BUILD_OPTIONS
 
 ## Turn on useful colouring.
-if __mdw_programp dircolors; then eval $(dircolors -b "$HOME/.dircolors")
-else unset LS_COLORS; fi
+if __mdw_programp dircolors; then
+  eval $(TERM=${TERM-xterm} dircolors -b "$HOME/.dircolors")
+else
+  unset LS_COLORS
+fi
 export GREP_COLORS="mt=01;31:ms=01;31:mc=031;31:fn=36:ln=36:bn=36:se=34"
 export DIFF_COLORS="hd=1:ln=36:ad=32:de=31"