From ae733d53b3afb36bf68a771505485fe3aab3e888 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Wed, 13 Apr 2022 18:53:44 -0500 Subject: [PATCH] Modify our hostname get in the Bash PS1 to work on systems without hostname installed Might just switch to that permanently tbh; it's nicer and quicker --- base/.profile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base/.profile b/base/.profile index 594ae5cf..82b181e9 100755 --- a/base/.profile +++ b/base/.profile @@ -328,9 +328,15 @@ _ps1bash() { # Add hostname prefix in SSH sessions unset _prefix + # Get the system hostname, using a util if one's available + if command -v hostname; then + _hostname="$(hostname -s)" + else + _hostname="$(