Adds current branch/hash to prompt and colors it by current status like untracked files, behind or ahead, merge conflicts, and many more.
Clone the repository, add
function prompt_command {
export PS1=$(path/to/promptig/folder/promptig)
}
export PROMPT_COMMAND=prompt_command
to the end of ~/.bashrc (Linux) or ~/.bash_profile (Mac) and adapt the PS1 path accordingly (e.g. PS1=$(~/Projects/promptig/promptig)
).
- Color codes are terminal dependent. http://www.arwin.net/tech/bash.php#s_1
Cyan='\e[0;34m'
may not be cyan in your terminal. See color palette (Edit → Profile Preferences → Colors → Palette)
- Run
test/test.sh
to see a preview output
-
Add a new file to test/tests with file extension
.sh
(e.g. my-ultimate-feature.sh) and make it executeable (chmod +x my-ultimate-feature.sh
) -
Copy the code from another test file and modify it
-
Run
test/test.sh
to see a preview output