Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Console2 and ConEmu - weird command prompt

Thank you very much in advance for helping.

I'm a happy user of Cygwin and Mintty in Windows 7. But I always like to see what other options are out there. So I downloaded Console2 and ConEmu.

First step is, always, is runinng bash. That was easy. Just typing 'bash'... Second step, customise the appearance. This was impossible!

As you can see in the following screen shot, it looks like the ANSI colors are not suported, which I can expect form Console2, but no form ConEmu. The order of consoles is (from top to bottom): Mintty (Cygwin), Console2 and ConEmu.

enter image description here

So any ideas what's going on?

I downloaded Console2 months ago, and I think the colors worked ok. I have no idea why now it has the powershell appearance.

I actually tried Powershell some weeks ago and tweaked the colors a little bit. Can that have caused the mess within the other terminals?

Luckily for me Mintty is fine.

Thanks!

UPDATE:

It looks like the problem is actually in my custom command prompt!

It works fine in Mintty but Console2 and ConEmu doesn't like it.

# Custom Shell

# Green 113
# Red 173
# Blue 81
# Yellow 186
# Light Green 194
# Light Blue 195

function EXT_COLOR () { echo -ne "\e[38;5;$1m"; }
function CLOSE_COLOR () { echo -ne '\e[m'; }
PS1=' `EXT_COLOR 81`\]\u@\h`CLOSE_COLOR`\] `EXT_COLOR 195`\]$PWD >`CLOSE_COLOR`\]`EXT_COLOR 173`\]$(__git_ps1 " (%s)")`CLOSE_COLOR`\]\n '
export LS_COLORS='di=38;5;108:fi=00:*svn-commit.tmp=31:ln=38;5;116:ex=38;5;186'
echo -e "\e[38;5;194m$(date +%A\ %d\ %B\ %Y\ -\ %H:%M)\e[m"
like image 348
RafaelGP Avatar asked Oct 07 '22 09:10

RafaelGP


1 Answers

As for ConEmu

  • run bash as root process (aka as shell), why you try to use it from cmd without arguments?? correct syntax is sh.exe --login -i.
  • if you want special palette (e.g. brown background) - set up palette (Colors page)

Your screenshot is low quality, text is not readable. But it seems like bash don't use ANSI colors (what for? afaik it write colors directly to console). So, you need to dig your bash settings, to enable coloring of prompt. Refer to bash manuals or your settings, may be TERM variable must be defined - don't know.

At last, ConEmu supports ANSI escape sequences, but

  1. ConEmuHk.dll must be injected in process (which uses Ansi), so bash must be the root process or option "Inject ConEmuHk" must be On.
  2. Option "Ansi X3.64" must be On too.

I downloaded Console2 months ago, and I think the colors worked ok. I have no idea why now it has the powershell appearance.

Afaik, Console2 stores its palette in xml file. And it is only one palette for all console apps runned in Console2.

ConEmu may be configures for your taste. There is main palette (Colors page) and it is possible to choose own palettes for any console app, runned in ConEmu (App distinct page).

I actually tried Powershell some weeks ago and tweaked the colors a little bit. Can that have caused the mess within the other terminals?

Seems like you have set up Powershell palette in Console2 (manually).

like image 53
Maximus Avatar answered Oct 12 '22 13:10

Maximus