amirsas / mobileterminal

Automatically exported from code.google.com/p/mobileterminal
0 stars 0 forks source link

Colors in terminal - green presented as red #290

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. When using control characters to set the color of a text to green color.
For example, if I set custom PS1 prompt to have GREEN color by entering 
something like this to mobileterminal:

PS1='\[\033[01;32m\]\u@\h\ \w \$\[\033[00m\] '

The prompt turns RED even if color code 01;32m is supposed to represent GREEN 
color. 

What is the expected output? What do you see instead?
I'm expecting to see GREEN text color instead of RED of the prompt in 
mobileterminal if I use color code 32 which should be green, red is 31.

Other color codes I tried, for example yellow - 33 and so on, are working well. 
So if i want prompt to be red I enter:

PS1='\[\033[01;31m\]\u@\h\ \w \$\[\033[00m\] '

and I get RED prompt which is correct because 31 is for RED. So the bug is 
obvious - GREEN color code is displayed as RED color. My examples should 
produce prompt in two different colors, but both produce red prompt.

What version of the product are you using? On what operating system?
My mobileterminal claims to be v. 520-2 and I'm using it on iPod touch with IOS 
5 beta 6. 

In the "old" branch of mobileterminal (on my old iPod with IOS 2) colors 
behaves well and green is green.

Please provide any additional information below.
I know is not a big bug but I'll be glad to see that fixed, as I like to have a 
green prompt for normal user and red for the root.

There are also some other bugs i noticed on this app in IOS 5 so after i test 
them better i'll report them. Hope i'll have time to get xcode one day and try 
fix some myself.

Original issue reported on code.google.com by marian%i...@gtempaccount.com on 4 Oct 2011 at 8:25

GoogleCodeExporter commented 8 years ago

Original comment by allen.po...@gmail.com on 11 Oct 2011 at 11:48

GoogleCodeExporter commented 8 years ago
Fixed in revision 524. (one line change)

Original comment by allen.po...@gmail.com on 11 Oct 2011 at 11:59