aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2019-10-25 14:04:48 +0100
committerGitHub <noreply@github.com>2019-10-25 14:04:48 +0100
commit86743660c77f0b413e7cb26ed9f236f90504f504 (patch)
tree74564f27b0edf17ed57480ce310e64f04ddf0230
parent2b024b483fc754092829a60e16bfc34913d48ea6 (diff)
parent0749b377b367e0fc7090f07bb5c3ae40ce86bf91 (diff)
Merge pull request #5 from thytom/hostname
Hostname module
-rwxr-xr-xmodules/hostname12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/hostname b/modules/hostname
new file mode 100755
index 0000000..41ec4fa
--- /dev/null
+++ b/modules/hostname
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Prints USER@hostname
+
+PREFIX=' '
+
+get_hostname()
+{
+ echo "$PREFIX$USER@$(hostname)"
+}
+
+get_hostname