Bug 621106

Summary: badly colored character in PS1 after \n
Product: Red Hat Enterprise Linux 6 Reporter: Nikola Pajkovsky <npajkovs>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dhoward, tsmetana
Target Milestone: rcKeywords: RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-04 11:59:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nikola Pajkovsky 2010-08-04 09:30:21 UTC
How reproducible:
Set there values in ~/.bashrc

txtgrn='\[\e[0;32m\]' # Green
txtwht='\[\e[0;37m\]' # White
bldblk='\[\e[1;30m\]' # Black - Bold
bldylw='\[\e[1;33m\]' # Yellow
bldblu='\[\e[1;34m\]' # Blue
bldcyn='\[\e[1;36m\]' # Cyan
bldwht='\[\e[1;37m\]' # White

function get_git_branch
{
   git branch 2> /dev/null | grep \* | python -c "print '['+raw_input()[2:]+']'" 2> /dev/null
}

PS1="${bldblk}[${bldgrn}\u@\H${bldblk}:${txtwht}${SSH_TTY} ${txtgrn}+$((${SHLVL}-1))${bldblk}] ${txtblu}\w${txtwht} \n\$(get_git_branch)${txtrst}\$ "


Steps to Reproduce:
1. Run bash
2. vim ~/.bashrc
3. exit vim
4. arrow up in history
5. arrow down in history
  
Actual results:
$ vim vim ~/.bashrc
   ^^ impossible to erase it(new line helps)

Expected results:
$ vim ~/.bashrc

Additional info:
Have fun ;)

Comment 2 RHEL Program Management 2010-08-04 09:47:38 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **