Last active
February 28, 2023 09:32
-
-
Save eze-kiel/bb09b4a4c8545780fb7455152fd0b6ed to your computer and use it in GitHub Desktop.
This file contains 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
# prompt customization for .bashrc | |
# `root` has a red prompt, others a yellow/brown one. | |
# If we are connected remotely, `@<hostname>` shows first. | |
build_ps1() { | |
local prompt_color='\[\e[33m\]' | |
local host='' | |
[[ $UID -eq 0 ]] && prompt_color='\[\e[1;31m\]' | |
[[ $SSH_TTY ]] && host="@$HOSTNAME " | |
echo "${prompt_color}${host}\w\[\e[0m\]" | |
} | |
PS1="$(build_ps1)\$(__git_ps1) \$ " | |
PS2='\\ ' | |
PS4='+ $LINENO: ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment