From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29740 invoked from network); 11 Nov 1999 11:02:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Nov 1999 11:02:25 -0000 Received: (qmail 405 invoked by alias); 11 Nov 1999 11:01:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8621 Received: (qmail 398 invoked from network); 11 Nov 1999 11:01:53 -0000 Subject: Re: Emulation and NUMERIC_GLOB_SORT In-Reply-To: <991111102514.ZM19137@candle.brasslantern.com> from Bart Schaefer at "Nov 11, 1999 10:25:14 am" To: schaefer@candle.brasslantern.com (Bart Schaefer) Date: Thu, 11 Nov 1999 11:01:46 +0000 (GMT) Cc: zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >However, now that I think of it, globbing order is already going to be >altered by LC_COLLATE, so scripts that rely on it are out of luck in >the first place. Erk. I hope that's not POSIX. I think we should probably remove that, just as we removed it from character ranges, and for exactly the same reason that we want NUMERIC_GLOB_SORT to be reset by emulation. Fundamentally, I view globbing as a programming feature, which should be utterly unaffected by locale. Same for string comparisons in [[]]. I think we do want a locale-dependent string comparison operation, but its use is very much the exception, not the rule. Pattern matching and string comparisons are used on all sorts of strings, and only very rarely on natural-language text. Exactly the same argument applies to numeric syntax; the use of "." as the decimal point is part of the language syntax, and should not be locale-dependent. A builtin that could take a number in standard syntax and render it in locale-dependent syntax would be nice.[1] If use of LC_COLLATE in globbing is POSIX (and maybe even if it's not), we could reasonably make that another option, which would itself be affected by emulate (and I'd argue that it should be off by default in all current emulation modes). -zefram [1] That reminds me, one of the things I never got round to implementing as a builtin was the POSIX "printf" utility. The advantage of having it as a builtin is that we could then use the same code for a "sprintf" builtin, which would put the result into a shell variable instead of sending it to standard output, which is a feature I often miss.