Skip to content

Instantly share code, notes, and snippets.

@maddouri
Last active March 28, 2025 21:34
Show Gist options
  • Save maddouri/f4878e9602d30666611aa50d6f47e451 to your computer and use it in GitHub Desktop.
Save maddouri/f4878e9602d30666611aa50d6f47e451 to your computer and use it in GitHub Desktop.
My Bash Primary Prompt
# [last_return_code] user_name @ host_name MINGW64 : (git_branch) current_directory
# $
PS1='\[\e[00;37m\]\n[$?] \[\e[0m\]\[\e[01;34m\]\u\[\e[0m\]\[\e[00;37m\] @ \[\e[0m\]\[\e[01;32m\]\h\[\e[0m\]\[\e[00;37m\] \[\e[01;35m\]$MSYSTEM\[\e[0m\] :\[\e[01;35m\]`__git_ps1` \[\e[0m\]\[\e[01;37m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[01;37m\]\\$\[\e[0m\] '
# [last_return_code] user_name @ host_name distro_pretty_name (git_branch) current_directory
# $
PS1="\[\e[00;37m\]\n[$?] \[\e[0m\]\[\e[01;34m\]\u\[\e[0m\]\[\e[00;37m\] @ \[\e[0m\]\[\e[01;32m\]\h $(grep PRETTY_NAME /etc/os-release | cut -d '=' -f2 | tr -d '"')\[\e[0m\]\[\e[00;37m\]\[\e[01;35m\]\$(echo -n \"\$(__git_ps1) \")\[\e[0m\]\[\e[01;37m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[01;37m\]\\$\[\e[0m\] "
# [last_return_code] user_name @ host_name : (git_branch) current_directory
# $
PS1='\[\e[00;37m\]\n[$?] \[\e[0m\]\[\e[01;34m\]\u\[\e[0m\]\[\e[00;37m\] @ \[\e[0m\]\[\e[01;32m\]\h\[\e[0m\]\[\e[00;37m\] :\[\e[01;35m\]$(__git_ps1) \[\e[0m\]\[\e[01;37m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[01;37m\]\\$\[\e[0m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment