From ab69ef4b83d7420dfe7229e1b79f55ee6afafeba Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 25 Oct 2025 10:44:23 +0200 Subject: [PATCH] Remove unused LC_COLLATE and LC_MONETARY We may have used LC_COLLATE in the past via libc functions but I don't think we do today. In future, we could document the variables not used by fish, but we should make it obvious what we're documenting. --- doc_src/language.rst | 10 +--------- src/env_dispatch.rs | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/doc_src/language.rst b/doc_src/language.rst index e57dd9167..33b3d2ea1 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1563,7 +1563,7 @@ You can change the settings of fish by changing the values of certain variables. .. describe:: Locale Variables - Locale variables such as :envvar:`LANG`, :envvar:`LC_ALL`, :envvar:`LC_COLLATE`, :envvar:`LC_MESSAGES`, :envvar:`LC_MONETARY`, :envvar:`LC_NUMERIC` and :envvar:`LC_TIME` set the language option for the shell and subprograms. See the section :ref:`Locale variables ` for more information. + Locale variables such as :envvar:`LANG`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, :envvar:`LC_NUMERIC` and :envvar:`LC_TIME` set the language option for the shell and subprograms. See the section :ref:`Locale variables ` for more information. .. describe:: Color variables @@ -1838,18 +1838,10 @@ The "locale" of a program is its set of language and regional settings that depe Usually the other variables should be used instead. Use LC_ALL only when you need to override something. -.. envvar:: LC_COLLATE - - This determines the rules about equivalence of cases and alphabetical ordering: collation. - .. envvar:: LC_MESSAGES Determines the language in which messages are displayed, see :doc:`builtin _ (underscore) `. -.. envvar:: LC_MONETARY - - Determines currency, how it is formatted, and the symbols used. - .. envvar:: LC_NUMERIC Sets the locale for :doc:`formatting numbers `. diff --git a/src/env_dispatch.rs b/src/env_dispatch.rs index 5e154ac40..ff1812ddc 100644 --- a/src/env_dispatch.rs +++ b/src/env_dispatch.rs @@ -25,11 +25,10 @@ /// List of all locale environment variable names that might trigger (re)initializing of the locale /// subsystem. These are only the variables we're possibly interested in. -const LOCALE_VARIABLES: [&wstr; 8] = [ +const LOCALE_VARIABLES: [&wstr; 7] = [ L!("LANG"), L!("LANGUAGE"), L!("LC_ALL"), - L!("LC_COLLATE"), L!("LC_MESSAGES"), L!("LC_NUMERIC"), L!("LC_TIME"),