]> code.delx.au - dotfiles/commitdiff
bash: don't use hostname command
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 6 Mar 2022 12:00:12 +0000 (23:00 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 6 Mar 2022 12:00:12 +0000 (23:00 +1100)
.bashrc

diff --git a/.bashrc b/.bashrc
index 69754e69d36ab052302e96de39ddb691ead7db29..361d97ca8e9c308184b9063219e6a93db0733d60 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -293,7 +293,7 @@ aliasf edit "$EDITOR"
 function print_title_prompt {
     printf '\e]0;bash:%s (%s)\a' \
         "${PWD/$HOME/\~}" \
-        "$(hostname -s)"
+        "$(cat /etc/hostname)"
 
     if [[ "$TERM" == screen* ]]; then
         printf '\ekbash\e\\'
@@ -319,7 +319,7 @@ function print_title_exec {
 
     printf '\e]0;%s (%s)\a' \
         "$(tr -cd '[:graph:] ' <<< "$BASH_COMMAND")" \
-        "$(hostname -s)"
+        "$(cat /etc/hostname)"
 
     if [[ "$TERM" == screen* ]]; then
         printf '\ek%s\e\\' \