Just like gzip... With GNU ed 1.21.1 (from the Debian package ed 1.21.1-1):
$ touch "$(printf "file\e[H\e[c\n\b")" $ chmod 0 file* $ ed file* ed outputs the file name unsanitized, thus with non-printable characters to the terminal. Here, this makes xterm crash (due to a bug in xterm), but this is also bad in GNOME Terminal, where I had zshenv r181012 [TERM=xterm-256color - charmap: UTF-8] zshrc r180040 [SHLVL=1 - /usr/bin/zsh 5.9 (debian/5.9-8+local3)] The tty is frozen zshrc included: zfilesfct r125411 / zalias r176060 / zcomp r152319 qaa:~> cd dir2 <1:48:22 qaa:~/dir2> <1:48:22 and after "ed file*": zshenv r181012 [TERM=xterm-256color - charmap: UTF-8] : Control characters 1-31 not allowed in file names.9-8+local3)] ^[[?61;1;21;22;28c zshrc included: zfilesfct r125411 / zalias r176060 / zcomp r152319 qaa:~> cd dir2 <1:48:22 qaa:~/dir2> ed file* <1:48:46 file -- Vincent Lefèvre <vinc...@vinc17.net> - 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)