From f6b661ebf0cbd9ecae64eb1f757dc1b4073b1d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 11 Jun 2022 22:05:17 +0200 Subject: Allow using in nix develop and use prompt to signal it --- bashrc.d/prompt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bashrc.d/prompt') diff --git a/bashrc.d/prompt b/bashrc.d/prompt index dee3e53..6632037 100644 --- a/bashrc.d/prompt +++ b/bashrc.d/prompt @@ -1,8 +1,10 @@ # vim: ft=sh PS1='$( -if [ `id -u` -eq "0" ]; then +if [ "$(id -u)" -eq "0" ]; then echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] " +elif [ "${_SHELLRC:-}" = "develop" ]; then + echo -n "\[\e[1;33m\]\u@\h:\[\e[1;34m\]\W\[\e[1;33m\]\$\[\e[0m\] " else echo -n "\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] " fi)' -- cgit v1.2.3