Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh can output non-printable characters to the terminal in some error messages
- X-seq: zsh-workers 54743
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh can output non-printable characters to the terminal in some error messages
- Date: Wed, 10 Jun 2026 10:37:15 -0700
- 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-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zHFjOBHxDE2Ly5B+ONS+uW3u4VeYzzONnEfGMQN1HyA=; fh=SbTlPuNNxBzTkRlwWtqw/TXBY0HvGvtE97RpPp3sJPM=; b=RmUqijHt+DbdkXf3Tpdj4RiIAuaACropfEndfa5zx7c9minm+BxbilT9CbKsvoYBHq CmVZeSrEsH/JJwWfaHBwwMJLFXZTrceZNDFJ1rd6IfsgLt/yVltb71+s5I1Kqodc9tef Nbx730/EnkLcHquCfQdnQ6Y4yxzrycHQnAb2hcpFet7/tAN5nyDPBlSLRUj/NgQrLPO1 md5/AJkrfQzXS6f20gsiDMuhcgERdhY9u065iHyqySVxOcVCj2Fg2G1aNnj7X6fQn5Ky 3SWKKHEPO0c7mN5UE+xSwmY2ulBcYNhzK7jMPYscePIZsKBXfRdIIZfUzSkkA2cRDjUT HStQ==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1781113047; cv=none; d=google.com; s=arc-20240605; b=JQCR6g3jDrDU8S/wEZ6IHBiVbcNtU5/f8qBBbnbUy0CpBL30VqskCKhMIFIm+8cN5D jGfJpz5cuc90VLvmOtrUoRISG6crbstU11GC5wH16v9cRluypue+dyx7jlPkvzVeXpTq tEiPwmZU497tisWnm+RzYuDEdbT858+2Ym4j5zCMC5v7Qjn8wSUPBnuXAgQ9T5jLBjku 5enaHd4XE06txGnRvMTuLOu54MECrxcYHk2ElLslEgRzFVB9XW8psAT2jXAo/ySfIvD/ 0W6ZGY6xLIaMYFoUqUrXBeOfNcgev3Fn5TYXLWy4MmXg9z2bB8g96bX1uQLwzPplIPMU Kd4g==
- Archived-at: <https://zsh.org/workers/54743>
- In-reply-to: <CAHYJk3SKN7KrxGuLujqxXXKJUWFniL7patvELW8dLUBqWjiEpQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20260610095138.GA1479503@qaa.vinc17.org> <CAHYJk3QaHLt9cWYd2XRK6+=yZbAY3ChWK3-ibCHqKXtw-=jUXg@mail.gmail.com> <CAHYJk3SKN7KrxGuLujqxXXKJUWFniL7patvELW8dLUBqWjiEpQ@mail.gmail.com>
On Wed, Jun 10, 2026 at 10:01 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> Hmm, did you make the same mistake I did there? Eg, we didn't include
> the #!/bin/zsh shebang. My script was run with /bin/sh and I suspect
> so was yours?
You don't need zsh or sh to "expose" this ...
% mkdir /tmp/emptydir
% cd /tmp/emptydir
% touch file$'\033'\[H$'\033'\[c$'\n'$'\b'
% find . -print
(screen clears)
% cd ..
% rm -ri emptydir
examine files in directory emptydir? y
remove emptydir/file(cursor jumps up several lines, some garbage displayed)
(type "y" and enter)
remove emptydir? y
rm: emptydir: Directory not empty
%
With the notable exception of "ls", most tools do not sanitize
filename output. However:
% zmodload zsh/files
% rm -ri emptydir
rm: remove `emptydir/file^[[H^[[c\n^H'? y
rm: remove `emptydir'? y
%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author