Bug 621106 - badly colored character in PS1 after \n
Summary: badly colored character in PS1 after \n
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bash   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact: BaseOS QE - Apps
Keywords: RHELNAK
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-04 09:30 UTC by Nikola Pajkovsky
Modified: 2014-02-02 22:14 UTC (History)
2 users (show)

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

Attachments (Terms of Use)

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 Product and 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. **

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