Skip to content

Instantly share code, notes, and snippets.

@jerinisready
Created March 10, 2026 09:55
Show Gist options
  • Select an option

  • Save jerinisready/e7a03e2cefa3c8675654f0df3c7184b6 to your computer and use it in GitHub Desktop.

Select an option

Save jerinisready/e7a03e2cefa3c8675654f0df3c7184b6 to your computer and use it in GitHub Desktop.
# !/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