[pass] [patch] use getopt to regularize options
Brian Mattern
rephorm at rephorm.com
Wed Sep 12 19:02:19 CEST 2012
On Wed, 12 Sep 2012, Stephen Paul Weber wrote:
> Somebody claiming to be Simon Zimmermann wrote:
> >On Wed, Sep 12, 2012 at 7:21 AM, Brian Mattern <rephorm at rephorm.com> wrote:
> >>I *think* this is portable, but don't have access to any
> >>systems other than linux to test on.
> >
> >Linux uses GNU C getopt library, while Mac OS X the BSD C
> >implementation of it.
>
> The `getopts` command is a little different from the getopt()
> library call. It would not suprise me if the GNU version of the
> command supports some extensions (like longopts), but for
> portability the spec is here: <http://pubs.opengroup.org/onlinepubs/009695399/utilities/getopts.html>
I used getopt, not getopts (which on my system exists only as a bash
builtin). The reordering of the options (which I now see is specific to
gnu-getopt) was the entire motivation for my patch. This along with the
long option support is worth the dependency on gnu-getopt in my opinion.
Thanks for the clarifications regarding compatibility,
Brian
More information about the Password-Store
mailing list