title: Extending terminal colors to the end of line
body: <p>I have a bash script which generates a motd. The problem is depending on some terminal settings which I am not sure about the color will extend to the end of the line. Othertimes it doesn't:</p>
  
  <p>e.g.</p>
  
  <p><img src="https://i.stack.imgur.com/HhAyr.png" alt="square"></p>
  
  <p>v.s.</p>
  
  <p><img src="https://i.stack.imgur.com/bn6CO.png" alt="jagged"></p>
  
  <p>IIRC one is just the normal gnome-terminal and the other is my tmux term. So my question is how can I get this to extend to 80 character (or really to the terminal width). Of course I can pad to 80 chars but that really doesn't solve the problem.</p>
  
  <p>Here is a snip of my code which generates the motd:</p>
  
  <pre><code>TC_RESET="^[[0m"                                                                
  TC_SKY="^[[0;37;44m"                                                            
  TC_GRD="^[[0;30;42m"                                                            
  TC_TEXT="^[[38;5;203m"   
  
  echo -n "${TC_SKY}                                                                              
  
  ... lots of printing..." 
  echo -e "\n                           Welcome to Mokon's Linux!                           \n"
  
  echo -n "${TC_GRD}"                                                             
  nodeinfo # Just prints the info seen below...                                                                       
  echo ${TC_RESET} 
  </code></pre>
  
  <p>How can I programmatically from bash change the terminal settings or something change the color to the end of the line?</p>