From 3e44c74ce8c1d7ac3f0721100cd62eae5c76e83c Mon Sep 17 00:00:00 2001 From: daniel fusser Date: Wed, 8 Jul 2026 19:34:57 +0200 Subject: [PATCH] mksh: color the prompt symbol and hostname label by host Same host-differentiation as the tmux statusbar: blue accent for prosrvdemadev01, existing yellow/gray colors kept as the default elsewhere. Co-Authored-By: Claude Sonnet 5 --- mksh/mkshrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mksh/mkshrc b/mksh/mkshrc index e3ebeab..87859a7 100644 --- a/mksh/mkshrc +++ b/mksh/mkshrc @@ -56,6 +56,12 @@ und="$(tput smul 2>/dev/null || echo '\e[4m')" # Reset rst="$(tput sgr 0 2>/dev/null || echo '\e[0m')" # Text Reset +# host-specific accent color (default stays as-is; override per host below) +case $HOSTNAME in + prosrvdemadev01) hostcol="$txtblu"; hostlblcol="$txtblu" ;; + *) hostcol="$txtylw"; hostlblcol="$txtgry" ;; +esac + # rust export PATH=$PATH:$HOME/.cargo/bin # go @@ -191,7 +197,7 @@ PS4='[$EPOCHREALTIME] '; PS1='#'; (( USER_ID )) && PS1='→'; PS1=$'\001\r''${| \\builtin typeset e=$? (( e )) && REPLY+="${txtred}$e${txtgry} " - { ( [[ -n $SSH_CLIENT ]] || [[ -n $SSH_TTY ]] ) && [[ -z $TMUX ]] } && REPLY+="${ita}${txtgry}${HOSTNAME} ${rst}" + { ( [[ -n $SSH_CLIENT ]] || [[ -n $SSH_TTY ]] ) && [[ -z $TMUX ]] } && REPLY+="${ita}${hostlblcol}${HOSTNAME} ${rst}" # REPLY+=${USER}@${HOSTNAME%%.*}: \\builtin typeset d=${PWD:-?}/ p=~; [[ $p = ?(*/) ]] || d=${d/#$p\//\~/} @@ -208,4 +214,4 @@ PS4='[$EPOCHREALTIME] '; PS1='#'; (( USER_ID )) && PS1='→'; PS1=$'\001\r''${| print -n "\e]133;A\e\\" # foot sequence for ctrl+shift+x/z \\builtin return $e -} '"${txtylw}${bld}$PS1 ${rst}" +} '"${hostcol}${bld}$PS1 ${rst}"