3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #67728 from kisik21/bash-module-emacs-eterm-remote-prompt-fix

nixos/bash: Improve Emacs detection for PS1
This commit is contained in:
Matthew Bauer 2019-08-29 18:01:27 -04:00 committed by GitHub
commit c2ef4fd2ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,7 @@ in
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
if [ -n "$INSIDE_EMACS" ]; then
if [ -n "$INSIDE_EMACS" -o "$TERM" == "eterm" -o "$TERM" == "eterm-color" ]; then
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
else