zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: schaefer@candle.brasslantern.com (Bart Schaefer)
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: Emulation and NUMERIC_GLOB_SORT
Date: Thu, 11 Nov 1999 11:01:46 +0000 (GMT)	[thread overview]
Message-ID: <E11lrz8-00075p-00@crucigera.fysh.org> (raw)
In-Reply-To: <991111102514.ZM19137@candle.brasslantern.com> from Bart Schaefer at "Nov 11, 1999 10:25:14 am"

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.


  reply	other threads:[~1999-11-11 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-11 10:25 Bart Schaefer
1999-11-11 11:01 ` Zefram [this message]
1999-11-11 11:35 Sven Wischnowsky
1999-11-11 11:42 ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E11lrz8-00075p-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).