Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#419233: zsh: error messages start with lowercase letters
- X-seq: zsh-workers 55275
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Bug#419233: zsh: error messages start with lowercase letters
- Date: Tue, 17 Nov 2026 10:16:35 +0100
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ETYFwnkHaPWBGKN8/vt0aDyAnfxNMyomMIDmq3roSds=; fh=DSq7imBqIFzdbbKtbVCpdy8HVz0gMsj8pDLr9jpnRMA=; b=IW5gHrpoo0a3wHaxOvJRPNi23RwuWvinsbPAYtalTd7LkNAMMSOaZXjBx11onOnXn4 XYtAXKUuqSl0WKWXauo6OMTPmmZN9NP6+qQTZKET8TzzRu7IEAN7+SywwwkTPNBoSEhn waKJnmbhe4s1/ypTlqjRUbiI4dkYlgDp144+AFaoS+1xe9PC4kjKzi7Bnj7dvCX0JyIG dAqCr2sltj+TTikTeZTbP+UmRPVsC9LUN6Z3tO2BFrXomRswcRhsDidFBHXX27rJl/57 fikZ/wmykSOCn4o4KbvSg5FMUtevs/bhj+DfB62NHyPRozMDo/ajC7EjNDs6TAOQYaFH OwVQ==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1794907010; cv=none; d=google.com; s=arc-20260327; b=oAyGyML7MY5FrlZtbnj3SsOkM1XIdxd+UKzohywZuLJgQIAvkBO/Fu4DibulIL1bm2 I1hO9Mg1U5kEFtLXRXbyais2iyFAqeHfK+2+WxHah+TxwcqCERBIxA6CxaHt3gbBtSrO tZ/lMMnGh4M2xOeh8QsZdTvGXL+BOPCeI8JhJ08BM4O6tLQvw+Bytja7YU4m3jNlSORG nasm1agYZ0YBXTzEezC08l2hdpuw1RVfuO7EJgBABuVi/m//BrtsVQY0f7vZnkKb/nF5 m0/rmOADV+pINZ0XwDT9dYsFuDt97da26Qrx/GNN+dYgrf2iaPTp+7Qj5wQrxY6ljT9f tzBw==
- Archived-at: <https://zsh.org/workers/55275>
- In-reply-to: <20070414143915.GA1397@scowler.net>
- List-id: <zsh-workers.zsh.org>
- References: <20070414140521.GA6436@debian.homenet> <20070414143915.GA1397@scowler.net>
On Sat, Apr 14, 2007 at 4:39 PM Clint Adams <schizo@xxxxxxxxxx> wrote:
>
> On Sat, Apr 14, 2007 at 04:05:21PM +0200, Michael Schutte wrote:
> > $ cd 404
> > cd: datei oder Verzeichnis nicht gefunden: 404
> >
> > zsh puts the first character of an error message into lowercase. While
> > one may find that this looks better in English, it is clearly wrong in
> > German where nouns are always capitalized. A patch is attached.
>
> Anyone have a clever idea on how to retain the historical behavior in
> English-speaking locales?
>
> > diff -ur zsh-4.3.2.orig/Src/utils.c zsh-4.3.2/Src/utils.c
> > --- zsh-4.3.2.orig/Src/utils.c 2007-04-14 15:38:58.000000000 +0200
> > +++ zsh-4.3.2/Src/utils.c 2007-04-14 15:39:57.000000000 +0200
> > @@ -171,15 +171,7 @@
> > errflag = 1;
> > return;
> > }
> > - /* If the message is not about I/O problems, it looks better *
> > - * if we uncapitalize the first letter of the message */
> > - if (num == EIO)
> > - fputs(strerror(num), stderr);
> > - else {
> > - char *errmsg = strerror(num);
> > - fputc(tulower(errmsg[0]), stderr);
> > - fputs(errmsg + 1, stderr);
> > - }
> > + fputs(strerror(num), stderr);
> > break;
> > }
> > } else {
I came across this one while looking through some downstream bug
trackers, and I think it's actually a little bit worse than the report
says. In a language that uses some non-ascii characters, it is not
entirely unthinkable that some sentences would start with such a
character. Then, those sentences would start with a capital letter
because tulower only works on ascii text, while other sentences would
be lowercased. Whichever aesthetics you prefer, you have to agree that
being inconsistent is the worst outcome.
I would argue that we simply drop this code as the quoted patch does.
I could potentially imagine putting it behind an option if people are
incredibly resistant to removing the downcasing, but it seems like a
very specific thing to have an option for. Bash leaves them
capitalized,
% bash -c cd\ 404
bash: line 1: cd: 404: No such file or directory
while dash has an interesting solution (presumably not related to our
motivation :),
% dash -c cd\ 404
dash: 1: cd: can't cd to 404
--
Mikael Magnusson
[I dropped the CCs because they probably don't care after 20 years]
Messages sorted by:
Reverse Date,
Date,
Thread,
Author