mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 23:12:44 +08:00
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).
This commit is contained in:
parent
79d5ff0350
commit
64921fe08a
8
share/functions/hostname.fish
Normal file
8
share/functions/hostname.fish
Normal file
|
@ -0,0 +1,8 @@
|
|||
# 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
|
Loading…
Reference in New Issue
Block a user