From b988e899b196a4f1c2b2fc70adb506e8b950cfa1 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Fri, 17 May 2024 10:47:05 -0500 Subject: [PATCH] Give toolbox PS1s the name of their container TY Fedora Magazine! https://fedoramagazine.org/alternative-way-of-saving-toolboxes-for-later-use/ --- base/.profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/.profile b/base/.profile index 17704d21..eae7ae65 100755 --- a/base/.profile +++ b/base/.profile @@ -273,7 +273,7 @@ _ps1bash() { if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then _prefix="${fg_bold}${fg_red}${_hostname}${r}${fg_red}:${r}${_prefix}" elif [ -n "$TOOLBOX_PATH" ]; then - _prefix="${fg_bold}${fg_magenta}toolbox${r}${fg_magenta}:${r}${_prefix}" + _prefix="${fg_bold}${fg_magenta}$(. /run/.containerenv && echo "$name")${r}${fg_magenta}:${r}${_prefix}" elif [ "$USER" != "salt" ]; then _prefix="${fg_bold}${fg_yellow}$USER${r}${fg_yellow}:${r}${_prefix}" fi