Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177687 - app-shells/bash - default bashrc causes issues with multiline commands
Summary: app-shells/bash - default bashrc causes issues with multiline commands
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-08 18:27 UTC by Leonardo Valeri Manera
Modified: 2007-05-08 18:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Valeri Manera 2007-05-08 18:27:43 UTC
see: http://forums.gentoo.org/viewtopic-t-556878.html

escape characters in the default /etc/profile /etc/bash/bashrc PS1 vars aren't contained in \[, \] pairs as per bash spec, leading to strange issues with editing multiline commands, as bash gets confused about spacing, calculating space for characters that do not appear on screen (the colour settings)

Reproducible: Always

Steps to Reproduce:
1.type a command that takes up 2 lines or more
2.try to edit
3.experience.. the twilight zone!

Actual Results:  
you have to sort of guess where the chars actually are by going over the parts you want to change with the cursor.

Expected Results:  
normal command editing
Comment 1 Leonardo Valeri Manera 2007-05-08 18:28:51 UTC
btw, this is with bash-3.2_p15-r1
Comment 2 SpanKY gentoo-dev 2007-05-08 18:56:24 UTC
PS1 in /etc/profile does not use escape sequences

PS1 in the default /etc/bash/bashrc is quoted just fine:
files/bashrc:  PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
files/bashrc:  PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '