Customize Windows Cmder Prompt

Update (Nov. 26, 2016): Cmder 1.3 changed how customizations work. This change was for the better, it’s simpler to apply this customization, you only need to drop in one file in the config folder. I’ve posted the code as cmder-powerline-prompt

I’m finding myself spending more and more time in the command line. But I use Windows, which isn’t very clever in the command line. It doesn’t have Linux OhMyZsh, but it has Cmder, which I like a lot.
Cmder comes with Git integration. It shows the Git status of current folder. Install it from Chocolatey.

What Cmder lacks (as far as I know) is customization packages you can download and install easily.

I was watching a video on YouTube when the speaker showed his Shell, and I wondered if I can get the same prompt on Cmder.

Cmder uses an init.bat file to set the prompt. It customizes Git using a git.lua file.
The shell in the video seems to be done using powerline or something similar.

After lots of poking around, I managed to get the same look in Cmder. Here’s what I’ve done:
CAUTION: Please backup your settings before making any changes. These changes work on my machine, not sure how it will affect yours.

The two symbols I’m using are the right arrow for line ending with unicode E0B0 and branch with unicode E0A0.
If you copy the snippets from the gist and those symbols aren’t copied correctly. Go to Windows Character Map and find them using the unicode under the Anonymice Powerline font and copy and paste them in Notepad++ (or any application that will preserve the character).
Open Cmder and enjoy the new shell.
If you have any cool customizations for Cmder, please share them in the comments.

Share