nixos/bash: use simple prompt for dumb terminals

This commit is contained in:
Nikolay Amiantov 2015-10-14 18:15:11 +03:00
parent 7b001ed68a
commit 7a9982d465

View File

@ -90,6 +90,7 @@ in
promptInit = mkOption {
default = ''
if test "$TERM" != "dumb"; then
# Provide a nice prompt.
PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
@ -97,6 +98,7 @@ in
if test "$TERM" = "xterm"; then
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
fi
fi
'';
description = ''
Shell script code used to initialise the bash prompt.