Merge pull request #10390 from abbradar/bash-tramp

nixos/bash: use simple prompt for dumb terminals
This commit is contained in:
Nikolay Amiantov 2015-10-22 14:07:19 +03:00
commit a9792367aa

View File

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