From 241fb25409774b788283d6e80b5217cf01e38307 Mon Sep 17 00:00:00 2001 From: Anthony Rose Date: Fri, 11 Oct 2024 19:51:46 +0100 Subject: [PATCH] Manually get the short hostname GNU Coreutils 'hostname' does not support the -s flag. --- roles/home-cli/files/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 7968eb6..59ba130 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -81,7 +81,7 @@ unset _flatpak_xdg_path # Basic exports. export HISTFILE="" -export PS1="$(id -un)@$(hostname -s)\$ " +export PS1="$(id -un)@$(hostname | sed 's/\..*//')\$ " export TIME_STYLE=long-iso # Used by GNU 'ls'. # Bash-specific settings that will not work in other Bourne-compatible shells.