diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-12-15 17:57:59 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-12-15 17:57:59 -0500 |
commit | cbe3a41096ce1a30e20c419df3bb565fe2e52fcb (patch) | |
tree | da8cdfcac27568f98d3c9a1d79e9472f59ae11fc | |
parent | 78261d94b9bbf55e6f5ace1be0774eb079ff46f2 (diff) |
suggesting simpler approach to getopt.
-rw-r--r-- | website/bugs/use_getopts_instead_of_getopt.mdwn | 9 |
1 files changed, 9 insertions, 0 deletions
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. |