Commit Graph

322 Commits

Author SHA1 Message Date
Jeremy Saenz
07cae0dfd4 Merge pull request #84 from JackC/help-printer
Use HelpPrinter in ShowCommandHelp
2014-05-27 16:53:49 -07:00
Jeremy Saenz
c05720b864 Merge pull request #86 from zenoss/upstream/feature/help-version-flags
Can now change these default flags in other applications
2014-05-27 16:53:18 -07:00
Summer Mousa
a911ec75e4 Can now change these default flags in other applications 2014-04-29 09:21:19 -05:00
Jack Christensen
357921b483 Use HelpPrinter in ShowCommandHelp 2014-04-26 17:02:33 -06:00
Jeremy Saenz
820deefc90 Merge pull request #83 from penberg/string-slice-usage-text
Make StringSliceFlag usage text consistent
2014-04-22 20:39:41 -07:00
Jeremy Saenz
73aae5979c Merge pull request #80 from wendorf/master
Add SkipFlagParsing option to Command
2014-04-22 20:34:36 -07:00
Jeremy Saenz
5e1cde20d3 Merge pull request #75 from Winslett/command-not-found
Customizable command not found function
2014-04-22 20:33:49 -07:00
Jeremy Saenz
a502865bb7 Merge pull request #74 from Winslett/context-accessible-command
Make Command accessible from Context
2014-04-22 20:33:02 -07:00
Jeremy Saenz
5a05be4a93 Merge pull request #82 from zenoss/upstream/feature/recursive-subcommands
A better version of infinite subcommands
2014-04-22 20:31:10 -07:00
Summer Mousa
2535376782 If the Subcommand is instantiated, via the Before method and has no subcommands, display the CommandHelp instead of the SubcommandHelp 2014-04-17 11:48:00 -05:00
Pekka Enberg
646b290d5d Make StringSliceFlag usage text consistent
This fixes StringSliceFlag default usage text to be consistent with
IntegerSliceFlag.

Before:

   -f []	`-f option -f option` port forwarding rules

After:

   -f '-f option -f option'	port forwarding rules

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2014-04-17 11:44:12 +03:00
Summer Mousa
faf2a3d4a3 Added Before method to command. If set, or if command.Subcommands is set, then the command is treated as a recursive subcommand 2014-04-16 15:26:28 -05:00
Summer Mousa
1a63283d44 dolling it up 2014-04-16 13:10:13 -05:00
Summer Mousa
4f92d19cbb Updated readme 2014-04-16 13:09:14 -05:00
Summer Mousa
705994c2c6 Added unit tests 2014-04-16 12:59:34 -05:00
Summer Mousa
13f0c8c0f6 More consistent implementation of recursive subcommands 2014-04-16 11:18:00 -05:00
Summer Mousa
1eaa882c3a removed extranneous value method on the generic type 2014-04-15 09:57:11 -05:00
Summer Mousa
13e88629f5 Generic parsers as flag types 2014-04-15 09:16:47 -05:00
Dan Wendorf and Karen Wang
6c5f810d8f Add SkipFlagParsing option to Command 2014-04-14 14:44:32 -07:00
Jeremy Saenz
640826c88f Merge pull request #78 from zenoss/feature/bash-completion
Bash completion
2014-04-14 10:00:36 -07:00
Jeremy Saenz
07c53fda7a Merge pull request #79 from rschmukler/master
remove quotes for empty StringFlags
2014-04-14 09:59:48 -07:00
Summer Mousa
85c3eadea4 Adding sample test 2014-04-12 17:13:47 -05:00
Summer Mousa
7544c56e3c Added some documentation and bash integration code 2014-04-12 16:59:41 -05:00
Summer Mousa
3a10545f91 Made bash completion command optional; still need to update documentation 2014-04-12 08:32:53 -05:00
Ryan Schmukler
312151dca4 remove quotes for empty StringFlags 2014-04-11 15:16:09 -04:00
Summer Mousa
0b29bee364 merging code 2014-04-10 12:14:13 -05:00
Chris Winslett
37299d4e5a Customizable command not found function 2014-03-30 20:46:02 -07:00
Chris Winslett
c69522c960 Make Command accessible from Context 2014-03-29 12:02:05 -07:00
Jeremy Saenz
3fa24ca4f3 Merge pull request #73 from unihorn/43
fix(context): copy StringSlice Flag correctly
2014-03-21 17:22:30 -07:00
Yicheng Qin
ce13660ae0 fix(context): copy StringSlice Flag correctly 2014-03-21 17:18:14 -07:00
Jeremy Saenz
4097aa09fe Merge pull request #70 from unihorn/27
Add BoolTFlag type
2014-03-21 17:11:07 -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
Jeremy Saenz
8f0575f520 Merge pull request #68 from bunnymatic/checking-that-description-works
Checking that description works
2014-02-25 19:24:12 -08:00
Mr Rogers
b4d98765bd rollback inconsequential changes 2014-02-19 16:38:51 -05:00
Mr Rogers
1ccba5fbb5 fix whitespace 2014-02-19 16:37:20 -05:00
Mr Rogers
a70d0bb136 add tests for description output 2014-02-19 16:32:01 -05:00
Jeremy Saenz
161c7e7496 Merge pull request #67 from tenpeoplemeet/patch-1
Fixed typo in README
2014-02-15 10:29:44 -08:00
tenpeoplemeet
673f4263fd Fixed typo in README 2014-02-15 12:06:07 +01:00
Jeremy Saenz
8242fd818c Merge pull request #65 from tjarratt/custom-help-printer
Add a way to override the app help printer
2014-02-04 17:01:07 -08:00
Tim Jarratt
58bfabca6d Add a way to override the app help printer
Fixes #64
2014-02-04 08:40:06 -08:00
Jeremy Saenz
c606efc92b Merge pull request #61 from cab/master
Subcommand example used non-existent function
2014-01-08 08:08:44 -08:00
Conner Bryan
1c561d6228 Subcommand example used non-existent function 2014-01-08 02:01:35 -05:00
Greg B
f7c1cd9a11 Add before function to app 2014-01-06 15:06:31 -08:00
Greg B
78d5f0dd40 Unit tests for Before() functionality 2014-01-06 15:06:31 -08:00
Jeremy Saenz
1cb2291894 Merge pull request #57 from fraenkel/optional
Allow to detect optional flags
2014-01-02 08:33:20 -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
5b3346951a Merge pull request #53 from kytrinyx/standardize-import
Standardize import statements
2013-12-07 09:58:54 -08:00
Katrina Owen
dde48a57c9 Standardize import statements 2013-12-07 07:10:04 -08:00
Jeremy Saenz
5e1854f702 Merge pull request #52 from kytrinyx/float-flag-doc-typo
Fix typo in godoc for Float64
2013-12-05 06:41:34 -08:00
Katrina Owen
ce737fe01e Fix typo in godoc for Float64 2013-12-05 06:33:55 -08:00