The man page says:

> The names read are handled the same way as command line arguments. > They undergo quote removal and word splitting, and any string that
> starts with a - is handled as tar command line option.

I understand that to mean that quote removal and word splitting always happen by default, and maybe even words starting with - are handled as command line options, it's not entirely clear that "any string that starts with -" means any line (stripped of whitespace) that starts with -

The more complete manual says:

> By default, each line read from the file list is first stripped off any leading and trailing whitespace. If the resulting string begins with ‘-’ character, it is considered a tar option and is processed accordingly

This says that special processing (ie of quotes and word splitting) only happens on lines that start with - (or whitespace followed by -).

And that seems to match GNU tar's behavior, ie I can do:
printf '"a b.txt"\n' > list
touch '"a b.txt"'
tar -cvf test.tar -T list

no quote removal or word splitting is happening there, contradicting the man page, but in agreement with the complete manual.

Reply via email to