Adding an option

Werner Koch wk at gnupg.org
Wed Aug 29 10:45:02 CEST 2001


On Tue, 28 Aug 2001 13:26:23 -0500, "Jonathan Hayward said:

> In my Tcl extension, I'm trying to add an option --passphrase
> <passphrase>. 

Don't do this, everyone can do a ps and view the passphrase.

> What are the steps involved in registering an option with the argument
> parser? It looks like I've left something out.

Add a new name into the option enum (oFoo), add an entry to the list
of options (use another otion which takes a string as a template) and
finally add a case oFoo to the big options switch in main().  I thing
--comment may be a goog example.

  Werner

-- 
Werner Koch        Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH      et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions                                        -- Augustinus





More information about the Gnupg-devel mailing list