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:
commit
c2ef4fd2ba
@ -98,7 +98,7 @@ in
|
|||||||
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
|
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
|
||||||
PROMPT_COLOR="1;31m"
|
PROMPT_COLOR="1;31m"
|
||||||
let $UID && PROMPT_COLOR="1;32m"
|
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;)
|
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
|
||||||
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
|
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user