[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1.19 check fails on cygwin

From: Antonio Diaz Diaz
Subject: Re: 1.19 check fails on cygwin
Date: Wed, 22 Feb 2023 00:43:07 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv: Gecko/20110420 SeaMonkey/2.0.14

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
       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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]