aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/hostname.fish
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-08-16 20:47:04 +0200
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-08-16 20:48:44 +0200
commit3e115b7a85184d16a5bb8d00fff702a62e3f8fea (patch)
tree433cc36061f92feb807b45fb16b27f54f39dda97 /share/functions/hostname.fish
parentca8e4c08a786f31f2ca2d353f54df3653fdd7a1a (diff)
Mac OS X doesn't support uname -o. Use uname instead.
I break compatibility with Mac OS X again, that I don't have access to. Result: Stuff break, and I have to fix it, so it will perhaps work. At least, I hope it will work.
Diffstat (limited to 'share/functions/hostname.fish')
-rw-r--r--share/functions/hostname.fish4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/functions/hostname.fish b/share/functions/hostname.fish
index eb667ef8..8caaca7c 100644
--- a/share/functions/hostname.fish
+++ b/share/functions/hostname.fish
@@ -1,5 +1,7 @@
# Query for USERDOMAIN to shorten waiting times when OS isn't Windows.
-if set -q USERDOMAIN; and test (uname -o) = Cygwin
+set -q USERDOMAIN
+and switch (uname)
+case 'CYGWIN_*'
# Cygwin's hostname is broken when computer name contains Unicode
# characters. This hack "fixes" hostname in Cygwin.
function hostname --description "Show or set the system's host name"