fish-shell/share/functions/hostname.fish
Konrad Borowski 64921fe08a Fix hostname command under Cygwin with Unicode characters
Yes, hostname is broken under Cygwin, but for fish it's an issue, as it
makes fish_config more buggy than it needs to be (by making UTF-8 errors
according to Python).
2013-08-12 09:56:03 +03:00

8 lines
348 B
Fish

# Query for USERDOMAIN to shorten waiting times when OS isn't Windows.
if set -q USERDOMAIN; and test (uname -o) = 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