bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash long prompt, color going past the end of prompt after reaching bott


From: Musse Abdullahi
Subject: bash long prompt, color going past the end of prompt after reaching bottom of terminal
Date: Thu, 22 Mar 2018 13:44:04 -0400

From: mabdulla
To: bug-bash@gnu.org
Subject: bash long prompt, color going past the end of prompt after
reaching bottom of terminal

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE
-DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin'  -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic
uname output: Linux onx-mabdulla-01.ciena.com 3.10.0-327.59.3.el7.x86_64 #1
SMP Thu Sep 21 09:34:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

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

Description:
    look at Repeat-By section

Repeat-By:

calculate_prompt1(){
    host="my-linux"
    git_branch="a very very very very very very very very very very
very very very very long prompt"
    prompt="@$host \\w : \[$(tput bold)$(tput setab 1)$(tput setaf
7)\]${git_branch}\[$(tput sgr0)\]\$ "
    export PS1="$prompt"}

PROMPT_COMMAND="calculate_prompt1;"

If you have to, resize your terminal so the prompt goes on two lines.

Then keep pressing enter until the bottom of the terminal.

keep pressing enter past the bottom of the terminal and you will see
that the background color doesn't

clear after the end of prompt


reply via email to

[Prev in Thread] Current Thread [Next in Thread]