summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorMehdi Sadeghi <mehdi@mehdix.org>2022-05-25 00:30:19 +0200
committerMehdi Sadeghi <mehdi@mehdix.org>2022-05-25 00:30:19 +0200
commitdbb661005d7e6ccc0e33316323d02d60062be9a0 (patch)
tree81166387881d20b2e4c64cbc9bc382f8f70a3274 /.local
parent86c3a2253e8761846e79bbf4164766a73bdfd732 (diff)
Change prompt to two lines and add nix.
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/prompt4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/prompt b/.local/bin/prompt
index 27e0039..d4d6592 100755
--- a/.local/bin/prompt
+++ b/.local/bin/prompt
@@ -3,6 +3,6 @@ BRANCH=$(git branch --show-current 2>/dev/null)
BRANCH=$(test -n "$BRANCH" && echo "($BRANCH)")
PROMPT="$USER@$(cat /proc/sys/kernel/hostname):$( test "$PWD" = $HOME && echo '~' || echo "$PWD")$BRANCH"
case $(id -u) in
-0) echo "$PROMPT# " ;;
-*) echo "$PROMPT$ " ;;
+0) echo -e "$PROMPT\\n# " ;;
+*) echo -e "$PROMPT\\n$ " ;;
esac