AbnormalSec / darkbox

what's in the box?! :package:
Do What The F*ck You Want To Public License
2 stars 1 forks source link

legacy style option support? #20

Closed deadPix3l closed 5 years ago

deadPix3l commented 5 years ago

some tools such as tar (tar xvzf file.tar) or ps (ps aux) were written before POSIX flag format was created. These tools allow flags to be specified without the '-' preceeding them (what would otherwise be: tar -xzvf, which is also valid and accepted by tar).

Is this something we wish to comply with? Supporting it means more, possibly very unclear code, while not supporting it means slight noncompliance with the original programs.

vesche commented 5 years ago

Looks like argparse doesn't support switch options without dashes - proceeding them. Seeing as ps -aux and tar -xzvf are valid, I say we require dashes for switch options. This is mostly, as you said, to keep from writing confusing code & edge cases. We'll document this for naysayers and move on.