Commit Graph

60 Commits

Author SHA1 Message Date
Chris Winslett
c69522c960 Make Command accessible from Context 2014-03-29 12:02:05 -07:00
Yicheng Qin
5903a0a844 Add BoolTFlag type
Compared to BoolFlag type, BoolTFlag treats 'true' as the default value
for the flag.

Without it, we have to use --no-action flag if we set the action is done
in default. But sometimes it is bad to maintain flags with negative meanings.
And it will be painful if we change the default value for the flag.

As this implementation, it keeps all existing functionality. So it
is compatible with old versions.
2014-03-05 17:24:22 -08:00
fraenkel
f88df0aa5a Allow optional flags by asking if its been set/present on the command line 2013-12-18 12:09:16 -06:00
Jeremy Saenz
70eacca641 JMS #25: Added support for help flags 2013-07-24 07:35:45 -07:00
Jeremy Saenz
e14e45d087 More test tweaking 2013-07-20 15:53:25 -07:00
Jeremy Saenz
6664835bc1 JMS #14: Moving toward having and app object 2013-07-19 08:34:01 -07:00
Jeremy Saenz
59b0ce24ef JMS #4: Support for global flags in cli.Context 2013-07-18 18:00:52 -07:00
Jeremy Saenz
3119b075d6 JMS #4: Flag testing 2013-07-18 17:41:22 -07:00
Jeremy Saenz
3f76896c4f JMS #4: Getting some cli tests going. Testing out flags 2013-07-18 17:41:22 -07:00
Jeremy Saenz
6f22315082 JMS #4: Parsing command flags with context 2013-07-18 17:41:22 -07:00