Closed tyilo closed 10 years ago
With this you can still have non-colored prompt and other colors using $USECOLOR == 1
and $COLOREDPROMPT == 0
.
This only has an effect if $USECOLOR == 0
and $COLOREDPROMPT == 1
, where then the prompt will not be colored.
Er... if usecolor is 0 the prompt will never be colored, which might not be what is intended.
Hmm... maybe add a $NEVERUSECOLOR
or something like that, which will disable all colors every where. $USECOLOR == 0
and $COLOREDPROMPT == 0
doesn't disable all colors.
See lines https://github.com/gdbinit/Gdbinit/blob/master/gdbinit#L150 and https://github.com/gdbinit/Gdbinit/blob/master/gdbinit#L194-L204 .
This may not be a problem normally as the colors will not do anything, when $USECOLOR == 0
.
However if you use a term that doesn't support colors at all (eg. Hopper's GDB Window), different outputs will be filled with [0m
's.
Let me check it out and add that option to really disable all the colors :-)
Also one last thing: I thought about checking the $TERM
env variable for starting with xterm. If it doesn't, the terminal probably doesn't support colors and you could then set $NEVERUSECOLOR
to 1.
That could work, needs some shell hacky stuff to retrieve that var. As far as I know you can't get the env variables in gdb. Or can I?
So yeah you'll need to use shell echo $TERM
with redirected stdout etc. :/
Check what I just commit. It should those issues with Hopper and terminals with problems.
Works for me, thanks
I think they should stay independent because colored prompt has issues with history and can be disabled now from the .gdbinit.local file.