diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-01-08 21:44:21 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-01-08 21:44:51 +0530 |
commit | 279654d9e5c91413596c2328e6de4dc35d2c4dc5 (patch) | |
tree | 538385953368566309154e1f37a40f139cca4dcb | |
parent | 75b2100504c5d5eb242388a7c92f7819e6a2dd20 (diff) |
common: refactor bash prompt
-rw-r--r-- | common.nix | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -94,9 +94,11 @@ in # programs programs.bash.promptInit = '' - PROMPT_COLOR="1;31m" - [ "$UID" -ne 0 ] && + if [ "$UID" -ne 0 ]; then PROMPT_COLOR="1;32m" + else + PROMPT_COLOR="1;31m" + fi PS1="\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] " ''; |