Skip to content

Instantly share code, notes, and snippets.

@untodesu
Created May 2, 2019 14:16
Show Gist options
  • Save untodesu/d3f816ffef222ad5de1e490f3fe22fa9 to your computer and use it in GitHub Desktop.
Save untodesu/d3f816ffef222ad5de1e490f3fe22fa9 to your computer and use it in GitHub Desktop.
For windows git bash
# Git-Prompt.SH
# Rewritten by ESUVSTAHT (undbsd)
## Window Title
PS1="\[\033]0;$MSYSTEM\007\]"
## Command Greeting
### Append username@hostname
PS1="$PS1"'\033[1;32m'
PS1="$PS1$(whoami)@$(uname -n)"
### Append colon
PS1="$PS1"'\[\033[0m\]'
PS1="$PS1:"
### Append working directory
PS1="$PS1"'\033[1;34m'
PS1="$PS1\w"
### Append Prompt
PS1="$PS1"'\[\033[0m\]'
PS1="$PS1$ "
## Apply all this shit
MSYS2_PS1="$PS1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment