Hello Marco,
Marco Atzeri wrote:
$ cat /pub/devel/ed/tmp/ed-1.19/tmp/w.log
\x2dhyphen\x2dprefixed\x2dfile: No such file or directory
I am not familiar with this escape "\x2dhyphen\x2dprefixed\x2dfile"
what is the expectation on Unix system ?
'\x2d' is the hexadecimal escape sequence corresponding to a hyphen. Ed
versions preceding 1.19 removed the backslash from such escape sequences in
file names, but I removed escape processing of file names from ed because
Andrew L. Moore reported file names with backslashes in the wild at
https://lists.gnu.org/archive/html/bug-ed/2022-01/msg00006.html
-----------------------------------------------------------------------------
2) Backslash-escape processing of filenames should be restricted to a
leading exclamation mark, if any, or eliminated altogether. The
intent of backslash escape processing was to support reading files
whose names begin with an exclamation mark without forking a shell.
But systemd, in particular, likes to generate files and directories
with backslashes (see, for example,
https://www.freedesktop.org/software/systemd/man/systemd-escape.html#).
This is problematic for
commands like `systemctl edit' if your editor is set to ed.
To illustrate the problem:
ed -p '*' '\x2dhyphen\x2dprefixed\x2dfile'
\x2dhyphen\x2dprefixed\x2dfile: No such file or directory
*f
x2dhyphenx2dprefixedx2dfile <-- backslashes have been stripped!
-----------------------------------------------------------------------------
I will package bypassing this literal name in the test
Thank you.
Just now I don't see how to make the testsuite skip this test on Cygwin, but
if I discover it, or if someone tells me how to do it, I'll make ed skip
this test.
Best regards,
Antonio.