summaryrefslogtreecommitdiff
path: root/share/rcm.sh.in
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2014-02-19 10:49:39 +0100
committerGravatar Mike Burns <mike@mike-burns.com>2014-02-19 10:49:39 +0100
commit04b627fe5ed97c66648995176481a0485200ac8d (patch)
tree8bbcee3f6aa182aa3e17cce09c7ca2658767989a /share/rcm.sh.in
parent3700be9ce6802653df30c413179d93316bf0b291 (diff)
Use sed to split out the short hostname
Instead of using the non-standard `-s` argument to `hostname`, use `sed` to split out everything after the first period. This fixes lsrc(1) on Cygwin, among others. Fixes #28.
Diffstat (limited to 'share/rcm.sh.in')
-rw-r--r--share/rcm.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in
index f4ee212..3260cd4 100644
--- a/share/rcm.sh.in
+++ b/share/rcm.sh.in
@@ -16,7 +16,7 @@ DEFAULT_DOTFILES_DIR=$HOME/.dotfiles
MV=mv
INSTALL=rcup
ROOT_DIR=$HOME
-HOSTNAME=`hostname -s`
+HOSTNAME=`hostname | sed -e 's/\..*//'`
unset CDPATH