Avoid a warning when HG is operating via SSH:
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 23 Dec 2022 20:26:07 +0200
changeset 1006 ad4478dd89fc
parent 1005 2b1061d35183
child 1007 0077617b0deb
Avoid a warning when HG is operating via SSH: remote: tput: No value for $TERM and no -T specified
.bashrc
--- a/.bashrc	Mon Nov 28 23:08:33 2022 +0200
+++ b/.bashrc	Fri Dec 23 20:26:07 2022 +0200
@@ -11,6 +11,11 @@
 shopt -s promptvars
 
 _my_ruler_handler() {
+  # To avoid a warning when HG is operating via  SSH:
+  #   remote: tput: No value for $TERM and no -T specified
+  if [[ -z "$TERM" ]]; then
+    return
+  fi
   local ruler='================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================'
   if [[ -x /usr/bin/tput ]]; then
     local size=`/usr/bin/tput cols`