aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--sh/profile.d/openbsd.sh9
2 files changed, 10 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index fd1a4ef1..8c3b89d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ newsbeuter/urls
sh/profile.d/*
!sh/profile.d/browser.sh
!sh/profile.d/keychain.sh
+!sh/profile.d/openbsd.sh
!sh/profile.d/timezone.sh
urxvt/urxvtd-*
vim/.netrwhist
diff --git a/sh/profile.d/openbsd.sh b/sh/profile.d/openbsd.sh
new file mode 100644
index 00000000..03e2217c
--- /dev/null
+++ b/sh/profile.d/openbsd.sh
@@ -0,0 +1,9 @@
+# OpenBSD systems don't handle 256 color terminals the way my Linux systems do,
+# seeming to be inconsistent about e.g. the correct number of parameters for
+# `tput setaf ...` -- I don't know which of them is right but for the moment
+# I'm siding with Linux. This chops off any -256color suffix to the terminal
+# name.
+if [ "$(uname -s)" = "OpenBSD" ]; then
+ TERM=${TERM%-256color}
+fi
+