#883579 unzip: Acts very strangely with options after "--"

Package:
unzip
Source:
unzip
Description:
De-archiver for .zip files
Submitter:
Askar Safin
Date:
2024-01-02 04:00:10 UTC
Severity:
normal
#883579#5
Date:
2017-12-05 11:56:44 UTC
From:
To:
There are two kinds of shell utils. Some understand "--" and threat all arguments after it as non-options (this utils are good).
Some don't understand "--" and try to threat it as normal option or as normal operand (this utils are bad, but they exist).
"unzip" is neither. It accepts "--" and start to ignore (!) all options it find after "--". Instead of, say,
threating them as normal operands, i. e. file names. Such behavior is very strange and should be fixed.

Example:

$ unzip -- -v /tmp/a.zip
Archive:  /tmp/a.zip
[/tmp/a.zip] txt.txt password:
 extracting: txt.txt

As you can see, "-v" is simply ignored. "unzip" didn't process it as file, nor as option.