Recently, I have encountered a zip file (containing a single file) that printed a custom message to standard out when I ran
without further arguments.
I was not aware that this is possible. I did read up about file comments in the ZIP specification, but they seem to behave differently on the CLI.
When I used
zip -c and entered a custom message, I could see that my custom message somehow gets compressed into the archive, but it won't print automatically when unzipping the file again.
unzip -l lets me view my message—but that is not how the original file
unzip -l archive.zip first prints the custom message, and then lists the archive contents. In opposite to my experiments with file comments, the comment is not printed in the list.
Therefore my question: how can I create a ZIP file that prints a custom message upon extraction? (And also, what is this feature called, if not file comments?)