From cbe3a41096ce1a30e20c419df3bb565fe2e52fcb Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 15 Dec 2008 17:57:59 -0500 Subject: [PATCH] suggesting simpler approach to getopt. --- website/bugs/use_getopts_instead_of_getopt.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) 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. -- 2.25.1