chiark / gitweb /
dot/shell-rc: Capture the hostname once and for all.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 22 Apr 2020 23:11:22 +0000 (00:11 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 22 Apr 2020 23:11:22 +0000 (00:11 +0100)
Rather than every time we set the prompt.

dot/shell-rc

index e29ac37f2781acf8fac77979472c3eed8546e4ec..67ad457679e5b6e0b615f1fdbea206553d984ccf 100644 (file)
@@ -61,7 +61,8 @@ __mdw_runhook () {
 ###--------------------------------------------------------------------------
 ### Prompt machinery.
 
-__mdw_set_prompt_hacks () { host=$(hostname); dir=""; }
+__mdw_host=$(hostname)
+__mdw_set_prompt_hacks () { host=$__mdw_host; dir=""; }
 
 __mdw_set_prompt_pieces () {
   local hqual