On 22.3. 22:22, Chet Ramey wrote:
On 3/22/18 1:44 PM, Musse Abdullahi wrote:

Bash Version: 4.2
Patch Level: 46
Release Status: release

Description:
     look at Repeat-By section

If the version information above is accurate, you should investigate
newer versions of bash. Version 4.2 is two major versions behind and
was released around seven years ago.

I get the same with '4.4.12(1)-release' too, but it doesn't seem related to Bash or the prompt. I can get it with just a printf, the colored part just needs to get wrapped by the end of line.

 printf "%100s $(tput setab 1)colored part$(tput sgr0) normal again\n"

If the screen scrolls, the background color on the last character gets copied to the next line. At least one way to work around that seems to be to clear the end of the line after the colored part ends, by putting "$(tput el)" after "$(tput sgr0)". You probably don't have anything to the right of the cursor at that point, so it'll only reset the color.

--
Ilkka Virta / itvi...@iki.fi

Reply via email to