[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Surprising behavior with inline environment variable expansion
From: |
Lawrence Velázquez |
Subject: |
Re: Surprising behavior with inline environment variable expansion |
Date: |
Sat, 29 Mar 2025 00:05:46 -0400 |
On Thu, Mar 27, 2025, at 5:22 PM, Chet Ramey wrote:
> On 3/26/25 6:29 PM, Robert Elz wrote:
>> LANG is generally just the fallback for categories that haven't been
>> set to something else. For this, assume the LC_ALL had never been
>> set (setting LANG after that is set should probably just do nothing)
>> so we have explicitly set LC_CTYPE, and then LANG, what should the
>> shell do with that one? Lookup all the category vars (how does the
>> shell author even know what they all are - we know the basic ones,
>> but I believe locales can add more categories) and set the ones which
>> no var is set to to the locale being assigned to LANG?
>
> I'd argue that the shell should modify the locale categories that affect
> its behavior. That's a tricky business, no doubt, but it bounds the
> effects (or you could just pay attention to all the categories that POSIX
> defines). Plus there's nothing in POSIX that I can see that allows locale
> definitions to add additional categories.
Maybe this does?
The locale definition file shall contain one or more locale
category source definitions, and shall not contain more
than one definition for the same locale category. If the
file contains source definitions for more than one category,
implementation-defined categories, if present, shall appear
after the categories defined by 7.1 General.
(Where "the categories defined by 7.1 General" are LC_CTYPE,
LC_COLLATE, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_MESSAGES.)
https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/basedefs/V1_chap07.html#tag_07_03
--
vq
- Surprising behavior with inline environment variable expansion, Léa Gris, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Andreas Schwab, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Andreas Kähäri, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Léa Gris, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Greg Wooledge, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Robert Elz, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/27
- Re: Surprising behavior with inline environment variable expansion,
Lawrence Velázquez <=
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/29
- Re: Surprising behavior with inline environment variable expansion, Lawrence Velázquez, 2025/03/29
- Re: Surprising behavior with inline environment variable expansion, Lawrence Velázquez, 2025/03/29
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/31
- Re: Surprising behavior with inline environment variable expansion, Andreas Schwab, 2025/03/31
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/31
- Re: Surprising behavior with inline environment variable expansion, Robert Elz, 2025/03/30
- Re: Surprising behavior with inline environment variable expansion, Léa Gris, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Chet Ramey, 2025/03/26
- Re: Surprising behavior with inline environment variable expansion, Andreas Schwab, 2025/03/26