dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Fornwall <fredrik@fornwall.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: dash@vger.kernel.org
Subject: Re: [PATCH] Set LC_ALL instead LC_COLLATE in mkbuiltins
Date: Sun, 24 May 2015 23:05:48 +0200	[thread overview]
Message-ID: <CAOhdH0uPNu3DN-iDRiiCvjpU6FPvK_4AvdEuZE3bQ8F3j9DuCg@mail.gmail.com> (raw)
In-Reply-To: <20150522042531.GA30829@gondor.apana.org.au>

On Fri, May 22, 2015 at 6:25 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> This causes any errors printed by sort to come out in English.
>
> Please fix this by simply setting LC_ALL to empty alongside
> LC_COLLATE=C.

A version with LC_ALL= follows:

diff -u -r ../dash-0.5.8/src/mkbuiltins ./src/mkbuiltins
--- ../dash-0.5.8/src/mkbuiltins 2014-09-28 04:19:32.000000000 -0400
+++ ./src/mkbuiltins 2015-05-17 19:08:00.076452891 -0400
@@ -78,7 +78,7 @@
  if ($i ~ /^-/)
  line = $(++i) "\t" line
  print line
- }}' $temp | LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{
+ }}' $temp | LC_ALL= LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{
  opt = ""
  if (NF > 2) {
  opt = substr($2, 2)
@@ -97,7 +97,7 @@
  */

 !
-sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 | LC_ALL= LC_COLLATE=C sort
-u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
  awk '{ printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)

  parent reply	other threads:[~2015-05-24 21:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-17 23:15 [PATCH] Set LC_ALL instead LC_COLLATE in mkbuiltins Fredrik Fornwall
2015-05-22  4:25 ` Herbert Xu
2015-05-22  4:40   ` Eric Blake
2015-05-22  4:45     ` Herbert Xu
2015-05-22 13:02       ` Eric Blake
2015-05-24 21:05   ` Fredrik Fornwall [this message]
2015-05-26  2:49     ` Herbert Xu

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=CAOhdH0uPNu3DN-iDRiiCvjpU6FPvK_4AvdEuZE3bQ8F3j9DuCg@mail.gmail.com \
    --to=fredrik@fornwall.net \
    --cc=dash@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    /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.
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).