On 17. 6. 25 09:45, Daniel Sahlberg wrote:
I personally think it should be possible to specify any legal filenames in the --targets file. Files with preceding or trailing whitespace is possible under Linux. It seems NTFS also allow this but the Windows shell trim both ends, cmd.exe allow creating files with preceding whitespace. I haven't checked macOS.

I forgot about this example:

   brane@zulu:~/src/bs$ touch "$(echo fileXname | tr 'X' '\n')"
   brane@zulu:~/src/bs$ /bin/ls -wl
   total 0
   -rw-r--r--  1 brane  staff  0 Jun 17 18:09 file
   name


You were saying, about "legal" filenames? Will you support this in the --targets file as well? It is, after all, no more an exception than the trailing spaces.

And, finally:

   brane@zulu:~/src/bs$ touch "$(echo 'fileX[1;31mnameX[0;m' | tr 'X' '\033')"
   brane@zulu:~/src/bs$ /bin/ls -wl
   total 0
   -rw-r--r--  1 brane  staff  0 Jun 17 18:19 filename


This one doesn't even have any hidden whitespace. And we do already support this in --targets. :)

-- Brane

Reply via email to