Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with colored prompt #19

Open
bchretien opened this issue Mar 18, 2014 · 4 comments
Open

Bug with colored prompt #19

bchretien opened this issue Mar 18, 2014 · 4 comments

Comments

@bchretien
Copy link
Contributor

Hi!

I had the need to disable the colored prompt because of the following bug: using ctrl + A to go to the beginning of the line "fails" when using a colored prompt. It instead goes to an offsetted position (probably because of the color escape codes) and modifying the line becomes quite tedious. Then scrolling up to the previous command and down again to get an empty prompt also leads to an offsetted prompt that can't be fully erased:

gdb_bug_report

Sorry for the obfuscated description ;-) I don't know if this is easily soluble, but the least I could do was report it.

@gdbinit
Copy link
Owner

gdbinit commented Mar 25, 2014

Ah I know this one, never bothered too much with it. Moving to the local is a good idea.

bchretien pushed a commit to bchretien/Gdbinit that referenced this issue Apr 17, 2014
@frameloss
Copy link

Just came across this project and I really like what you have done, thanks for all the effort.

Here is info on how to fix the readline problem: http://www.dirac.org/linux/gdb/03-Initialization,_Listing,_And_Running.php#acaveatforcoloredgdbprompts

Mine is set to the following and readline works correctly (changed to yellow prompt, but otherwise illustrates the point.)
set prompt \001\033[33m\002gdb$ \001\033[0m\002

@RadioheadFonts
Copy link

An easier fix for this is simply adding 0; before the red color code.

set prompt \033[0;31mgdb$ \033[0m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants