Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 621106 - badly colored character in PS1 after \n
badly colored character in PS1 after \n
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bash (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Roman Rakus
BaseOS QE - Apps
Depends On:
  Show dependency treegraph
Reported: 2010-08-04 05:30 EDT by Nikola Pajkovsky
Modified: 2014-02-02 17:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-04 07:59:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nikola Pajkovsky 2010-08-04 05:30:21 EDT
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 Product and Program Management 2010-08-04 05:47:38 EDT
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. **

Note You need to log in before you can comment on or make changes to this bug.