config.fish: remove unicode_start on linux console login

This command typically does

	ioctl(open("/dev/tty"), KDSKBMODE, K_UNICODE)
	printf '\033%%G'
	stty iutf8

Other shells don't do this; it seems like this is typically already done
before the shell is started, for example by systemd's vconsole-setup.
We only do it in very specific scenarios (login shells on linux), so
if this is really needed, we should make it reliable. Bravely remove it.
This commit is contained in:
Johannes Altmanninger
2026-06-02 09:05:33 +08:00
parent 4b2aba31ee
commit e4123df7be

View File

@@ -131,24 +131,12 @@ and __fish_set_locale
# Some things should only be done for login terminals
# This used to be in etc/config.fish - keep it here to keep the semantics
#
if status is-login
if command -sq /usr/libexec/path_helper
__fish_macos_set_env PATH /etc/paths '/etc/paths.d'
if test -n "$MANPATH"
__fish_macos_set_env MANPATH /etc/manpaths '/etc/manpaths.d'
end
functions -e __fish_macos_set_env
end
#
# Put linux consoles in unicode mode.
#
# TODO(terminal-workaround)
if test "$TERM" = linux
and string match -qir '\.UTF' -- $LANG
and command -sq unicode_start
unicode_start
if status is-login && command -sq /usr/libexec/path_helper
__fish_macos_set_env PATH /etc/paths '/etc/paths.d'
if test -n "$MANPATH"
__fish_macos_set_env MANPATH /etc/manpaths '/etc/manpaths.d'
end
functions -e __fish_macos_set_env
end
# Invoke this here to apply the current value of fish_user_path after