commit b553c1d6c14c9d9e4ddb007a783e3f2f94b6618c (patch)
Author: Alex Karle <firstname.lastname@example.org>
Date: Sat, 13 Jul 2019 00:48:59 -0400
[bash] don't set TERM in prompt
When I first created this prompt, it was heavily inspired by
@mathiasbynens. So, when he set TERM in the beginning, so did I.
However, I found the other day that this *can* have unintended
consequences. In particular, in a Linux Virtual Console (TTY, no X
server), the xterm... TERM can throw off tmux and not cause it to clear
the screen correctly (as tmux thinks that the thing connected to the
client is an xterm, but it's not).
In this case, we need TERM to be linux, but *really*, I should have
never been mucking around in this space anyways.
It seems that TERM is linux by default (works), and tmux sets
tmux-256color, so really it all works out if the prompt doesn't try to
do anything smart :)
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/bash/bash_prompt b/bash/bash_prompt
@@ -1,17 +1,6 @@
-# Stripped down version of https://github.com/mathiasbynens/dotfiles/
-# Modified for my current uses / level of understanding
-# if you got xterm-256, export it!
-if infocmp xterm-256color >/dev/null 2>&1; then
- # override xterm-256 if in tmux
- if ! [ -z "$TMUX" ]; then
- export TERM=tmux-256color
- export TERM=xterm-256color
+# Originally inspired by https://github.com/mathiasbynens/dotfiles/
+# but since trimmed down / modified for my own purposes
if [ -n "$SSH_CLIENT" ]; then