mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
Merge pull request #10390 from abbradar/bash-tramp
nixos/bash: use simple prompt for dumb terminals
This commit is contained in:
commit
a9792367aa
1 changed files with 8 additions and 6 deletions
|
@ -90,12 +90,14 @@ in
|
|||
|
||||
promptInit = mkOption {
|
||||
default = ''
|
||||
# Provide a nice prompt.
|
||||
PROMPT_COLOR="1;31m"
|
||||
let $UID && PROMPT_COLOR="1;32m"
|
||||
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
|
||||
if test "$TERM" = "xterm"; then
|
||||
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
|
||||
if test "$TERM" != "dumb"; then
|
||||
# Provide a nice prompt.
|
||||
PROMPT_COLOR="1;31m"
|
||||
let $UID && PROMPT_COLOR="1;32m"
|
||||
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
|
||||
if test "$TERM" = "xterm"; then
|
||||
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
description = ''
|
||||
|
|
Loading…
Reference in a new issue