From 520f634a22d20dbb93d76f5df2606bf96d2a9f39 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Tue, 3 Jul 2018 01:56:04 -0700 Subject: [PATCH] Update the prompt to display screen session title --- bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bashrc b/bashrc index 1b84fbf..111873e 100644 --- a/bashrc +++ b/bashrc @@ -58,6 +58,11 @@ else fi unset color_prompt force_color_prompt +# If this is a SCREEN session, modify the prompt +if [ -n "$STY" ]; then + PS1_PRE="\[\033[33m\](${STY#[0-9]*\.}:${WINDOW})\[\033[0m\] $PS1_PRE" +fi + PS1_POST=' \$ ' PS1="$PS1_PRE$PS1_POST" -- GitLab