From: Daniel Kahn Gillmor Date: Mon, 15 Dec 2008 22:57:59 +0000 (-0500) Subject: suggesting simpler approach to getopt. X-Git-Tag: monkeysphere_0.23~164^2~15 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=cbe3a41096ce1a30e20c419df3bb565fe2e52fcb;p=monkeysphere.git suggesting simpler approach to getopt. --- diff --git a/website/bugs/use_getopts_instead_of_getopt.mdwn b/website/bugs/use_getopts_instead_of_getopt.mdwn index af4c17a..2ec68d6 100644 --- a/website/bugs/use_getopts_instead_of_getopt.mdwn +++ b/website/bugs/use_getopts_instead_of_getopt.mdwn @@ -8,3 +8,12 @@ better for portability. So it looks like the sh built-in getopts does not include long options (eg. "--expire"). Is it worth getting rid of the long options for this? + +--- + +Why not just get rid of getopts altogether and perform a simple +argument-processing loop with bash string tests? We're only invoking +getopt in three places, and each invocation is no more complex than +three arguments -- and most arguments take a separate parameter, which +means that handling tricky arg blobs like -aCxr are not gonna be +supported anyway.