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



On 2026-06-10 10:37:15 -0700, Bart Schaefer wrote:
> 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)

I don't have any issue with "find" from the GNU findutils:

.
./file?[H?[c??

FYI, this was fixed in 2005 after I reported the problem with
non-printable characters:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311384

> % cd ..
> % rm -ri emptydir
> examine files in directory emptydir? y
> remove emptydir/file(cursor jumps up several lines, some garbage displayed)

Still no issues:

rm: descend into directory 'emptydir'? y
rm: remove regular empty file 'emptydir/file'$'\033''[H'$'\033''[c'$'\n\b'? y
rm: remove directory 'emptydir'? y

with "rm" from the GNU coreutils 9.10.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author