summary refs log tree commit diff
path: root/nixos/modules/programs/bash/bash.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/programs/bash/bash.nix')
-rw-r--r--nixos/modules/programs/bash/bash.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index 75efd5e29039..033de7a1d5c9 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/nixos/modules/programs/bash/bash.nix
@@ -90,8 +90,9 @@ in
 
       promptInit = mkOption {
         default = ''
-          if test "$TERM" != "dumb"; then
-            # Provide a nice prompt.
+          # Provide a nice prompt if the terminal supports it.
+          if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
+            echo "Set prompt!"
             PROMPT_COLOR="1;31m"
             let $UID && PROMPT_COLOR="1;32m"
             PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "