Skip to content

Instantly share code, notes, and snippets.

@ggrumbley
Last active March 15, 2018 18:19
Show Gist options
  • Save ggrumbley/9aeba731340ee9a6e70dac7e2140b968 to your computer and use it in GitHub Desktop.
Save ggrumbley/9aeba731340ee9a6e70dac7e2140b968 to your computer and use it in GitHub Desktop.
[WINDOWS] My PS1 Theme for Cmder (/cmder/vendor/clink.lua) | Git BASH (~/.config/git/git-prompt.sh) | Mintty theme goes in ~/.mintty/themes
if test -f /etc/profile.d/git-sdk.sh
then
TITLEPREFIX=SDK-${MSYSTEM#MINGW}
else
TITLEPREFIX=$MSYSTEM
fi
PS1='\[\033]0;Bash Prompt (Git for Windows) =>${PWD//[^[:ascii:]]/?}\007\]' # set window title
PS1="$PS1"'\n' # new line
PS1="$PS1"'\[\033[31m\]λ '
PS1="$PS1"'\[\033[32m\]\w' # current working directory
if test -z "$WINELOADERNOEXEC"
then
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
if test -f "$COMPLETION_PATH/git-prompt.sh"
then
. "$COMPLETION_PATH/git-completion.bash"
. "$COMPLETION_PATH/git-prompt.sh"
PS1="$PS1"'\[\033[36m\]' # change color to cyan
PS1="$PS1"'`__git_ps1`' # bash function
fi
fi
PS1="$PS1"' \[\033[32m\]❯\[\033[33m\]❯\[\033[31m\]❯ \[\033[37m\]'
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
ForegroundColour=235,219,178
BackgroundColour=29,32,33
CursorColour=253,157,79
Black=40,40,40
BoldBlack=146,131,116
Red=204,36,29
BoldRed=251,73,52
Green=152,151,26
BoldGreen=184,187,38
Yellow=215,153,33
BoldYellow=250,189,47
Blue=69,133,136
BoldBlue=131,165,152
Magenta=177,98,134
BoldMagenta=211,134,155
Cyan=104,157,106
BoldCyan=142,192,124
White=168,153,132
BoldWhite=235,219,178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment