fish-shell/share/functions/hostname.fish
Aaron Gyes 8277f6a1ba Let git normalize line-endings upon commit (LF)
Only one file belonging to fish-shell had DOS/bogus line endings,
with `git add' picking up changes after updating .gitattributes:
hostname.fish.

Unsurprisingly, it has code to support cygwin and was likely
worked on by a user on a Windows machine. This will help
such cases in the future.

Also, in pcre2-10.21/, there was RunTest.bat which was (correctly)
CRLF formatted.  We don't use this batch script at all, so rather
than LF it or add an exception, blast it away like the other pcre2
files omitted from the repo.
2016-08-01 04:38:08 -07:00

10 lines
342 B
Fish

# Query for USERDOMAIN to shorten waiting times when OS isn't Windows.
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"
echo $USERDOMAIN
end
end