Created
March 10, 2026 09:55
-
-
Save jerinisready/e7a03e2cefa3c8675654f0df3c7184b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # !/usr/bin/env bash | |
| #### PRINT TERMINAL LIKE #### | |
| # user@system:~/code/roja-pipeline main [02:50] | |
| # # User : Green [Logged in user@system] | |
| # # PWD : Blue [Present working direction] | |
| # # GitBranch : Purple [Optional Github Branch] | |
| # # Time : Yellow | |
| parse_git_branch() { | |
| git rev-parse --abbrev-ref HEAD 2>/dev/null | |
| } | |
| parse_git_dirty() { | |
| [[ -n $(git status --porcelain 2>/dev/null) ]] && echo "*" | |
| } | |
| PS1='\[\e[32m\]\u@\h\[\e[37m\]:\[\e[34m\]\w \[\e[35m\]$(parse_git_branch)\[\e[31m\]$(parse_git_dirty) \[\e[33m\][\A] \[\e[0m\]\$ ' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment