254 Commits (main)

Author SHA1 Message Date
Dan Buch 271b56c71b
Cleanups based on feedback in #361
8 years ago
Dan Buch 7371138edb
Add back App.RunAndExitOnError with deprecation message
8 years ago
Dan Buch 02924293ff
Removing unused vars
8 years ago
Dan Buch d45f7c1fe2
Allow for legacy and newer Action func signatures
8 years ago
Dan Buch f688d47415
Encapsulate ExitCoder check into a lil func
8 years ago
Dan Buch b7329f4968
Switch from multi-return with exit codes to ExitCoder check
8 years ago
Dan Buch a17c8cf1d8
Rename func type suffixes `Fn`->`Func` and add `OnUsageErrorFunc`
8 years ago
Dan Buch 10c8309d84
Merge branch 'develop' of https://github.com/txgruppi/cli into txgruppi-develop
8 years ago
Felamande 3fb51f15e8 use filepath.Base instead of path.Base in Name & HelpName as default values.
8 years ago
Jesse Szwedko bc465beccc Merge pull request #346 from codegangsta/category_sort_2
8 years ago
Radek Simko d21170f0e3 Never show version if HideVersion=true
8 years ago
Jesse Szwedko 042842b819 Remove CategorizedHelp from App and allow subcommands to have categories
8 years ago
Soulou d0997e8f99 Set Categories as a read-only method and fix tests
8 years ago
Soulou 994a7028e2 Categories as slice, not a map anymore, order is always preserved
8 years ago
Soulou a0801792cc Allow to sort commands by category
8 years ago
王振威 88ea7cbec8 Add App extras info
8 years ago
adamclerk cde8418658 Fixes spelling issues and import alphabetical issues
8 years ago
Jesse Szwedko d5f087da9d Merge pull request #289 from KSubedi/master
8 years ago
Gregor Noczinski 66c1742012 * Fixed typos
8 years ago
Gregor Noczinski c462071a52 * Added ability to customize usage error messages
8 years ago
leonardyp 6f6e8caf6c Repeat context statement because of a is a pointer
8 years ago
Gregor Noczinski f3c8e07836 Also show help if App/Command Before produces error.
9 years ago
Yagnesh Mistry b0b9bd5dac use path.Base in Name & HelpName as default values
9 years ago
Jacopo 4a8406ac89 Run check completion before error checking
9 years ago
Kaushal Subedi c70ad9b688 fixed tests
9 years ago
Ryan Graham 732e97aee8 only display app version and help message once
9 years ago
Jesse Szwedko 9039757268 Merge pull request #267 from tristanz/master
9 years ago
Nodir Turakulov c80fcac42b Honor HideHelp and HideVersion
9 years ago
Tristan Zajonc c7aac252f1 add tests
9 years ago
Tristan Zajonc cc46ca1020 allow overriding help name
9 years ago
Tristan Zajonc aced6e8739 fix tests
9 years ago
Tristan Zajonc ef65245544 add ArgsUsage to App and Command
9 years ago
Tarcísio Gruppi 49c1229409
Added exit code support
9 years ago
Tarcísio Gruppi 9c0db3f4ac
Created types for functions
9 years ago
Martin Falatic ee2cde7a77 Print blank lines in help and error outputs more consistently.
9 years ago
Jesse Szwedko 7ad88c2740 Merge pull request #238 from polds/copyright
9 years ago
Mawueli Kofi Adzoe c7be972e81 Fix tiny typo.
9 years ago
Peter Olds 2726643347 Add the ability to add a copyright
9 years ago
Jesse Szwedko 55b8924c2b Merge pull request #230 from codegangsta/do-not-swallow-after-error
9 years ago
Jesse Szwedko 7ed7a51f86 Aggregate errors from Before/After
9 years ago
Fabian Ruff 65d50017d4 search context hierachy for global flags
9 years ago
jszwedko e842547421 Readd printHelp function back
9 years ago
Dan Buch 2bcd11f863 Merge pull request #193 from codegangsta/add-aliases
9 years ago
jszwedko b95607c608 Use named struct fields
9 years ago
jszwedko 7beac44ab1 Don't default authors
9 years ago
jszwedko 5f95a9e88b Fix support for deprecated author fields
9 years ago
jszwedko bf65971a6a Add `Command.Aliases` and deprecate `Command.ShortName`
9 years ago
jszwedko 01cdaa065a Merge remote-tracking branch 'origin/master' into add-multi-author-support
9 years ago
jhowarth a6482d2687 Merge remote-tracking branch 'upstream/master'
9 years ago
jhowarth 6023f370c1 dry error messages
9 years ago
jhowarth e67e05f617 DRY error handling
9 years ago
jhowarth cbd95292ac Remove debugging
9 years ago
Harrison c6592bb487 app, help: add backwards compatibility for Authors
9 years ago
jszwedko 50c77ecec0 Fix comments for .After field on Command and App
9 years ago
Jesse Szwedko 532d0bc2e3 Merge pull request #151 from imdario/master
9 years ago
Harrison 3d7183307a app, help: add support for multiple authors
9 years ago
Dario Castañé dca177c384 After handler brought up to speed.
9 years ago
Dario Castañé 4ab12cd639 jszwedko's suggestion done
9 years ago
Dario Castañé 4e3a83b43e Merge branch 'master' of https://github.com/codegangsta/cli
9 years ago
jszwedko 5159b98cbc Use parsed context when running command as subcommnd
9 years ago
Dan Buch 5b9e204508 Merge pull request #153 from codegangsta/allow-hiding-of-help-flag
9 years ago
Jesse Howarth and Michael Ivey 7e05320026 Implement required flags
10 years ago
jszwedko e72094e6a4 Prefer fmt.Fprint* functions over io.WriteString
10 years ago
jszwedko b8c8282de5 Merge remote-tracking branch 'origin/master' into allow-writer-to-be-set
10 years ago
jszwedko 0d4870d63e Rename Stdout -> Writer
10 years ago
jszwedko 780f839a02 Allow hiding of help flag without hiding help subcommand
10 years ago
Dario Castañé 3c4b583fee Action error shadowing avoided on After
10 years ago
Dario Castañé 44efc2952d Added Before method to command and app
10 years ago
Peter Bourgon 179c7a5f7c Make -v, --version optional
10 years ago
Audrius Butkevicius e38bac8225 Print author
10 years ago
Jeremy Saenz 8c34b12d83 Merge pull request #114 from AudriusButkevicius/shortcut
10 years ago
Audrius Butkevicius 449f261ee9 Add App.RunAndExitOnError shortcut
10 years ago
Audrius Butkevicius 4a645835f0 Add HideHelp flag in App and Command
10 years ago
Philippe Lafoucrière df5fb46048 Fix global flags in Subcommands
10 years ago
John Hopper 60e3dcaf6d Allow a writer to be set that represents Stdout so that redirection of App output may occur.
10 years ago
Summer Mousa a911ec75e4 Can now change these default flags in other applications
10 years ago
Jeremy Saenz 5e1cde20d3 Merge pull request #75 from Winslett/command-not-found
10 years ago
Summer Mousa 2535376782 If the Subcommand is instantiated, via the Before method and has no subcommands, display the CommandHelp instead of the SubcommandHelp
10 years ago
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
10 years ago
Summer Mousa 13f0c8c0f6 More consistent implementation of recursive subcommands
10 years ago
Summer Mousa 3a10545f91 Made bash completion command optional; still need to update documentation
10 years ago
Summer Mousa 0b29bee364 merging code
10 years ago
Chris Winslett 37299d4e5a Customizable command not found function
10 years ago
Greg B f7c1cd9a11 Add before function to app
11 years ago
Katrina Owen 7d08fb3da5 Add shortcut for version flag
11 years ago
Jeremy Saenz 01b889e637 Merge branch 'master' of github.com:xyproto/cli into xyproto-master
11 years ago
Alexander Rødseth 1bea6dcbf0 Custom type for arguments
11 years ago
Jeremy Saenz 4120b604ec Removed help flag. we no longer need it.
11 years ago
Jared Forsyth dc8a62e0e9 refactor, more robust flag propagation
11 years ago
Jared Forsyth ccb1528bb0 adding multi-named flags
11 years ago
Alexander Rødseth 7050f048d1 Added simple man page support
11 years ago
Alexander Rødseth f93652a890 Fixed all problems/warnings reported by "go vet"
11 years ago
Jeremy Saenz b25b7a883c JMS #39: Removed all calls to os.Exit().
11 years ago
Jeremy Saenz e6e641143c JMS #39: App.Run returns an error
11 years ago
Jeremy Saenz 0d3c3f4497 Improved documentation
11 years ago
Jeremy Saenz e5c31ab592 JMS-34: App.Run() can now be run multiple times.
11 years ago
Casey McTaggart 3e07cbd8ba Show usage and exit with error whenever arguments parsing fails
11 years ago
Jeremy Saenz 70eacca641 JMS #25: Added support for help flags
11 years ago
Jeremy Saenz ed1ee94250 Adding some docs
11 years ago
Jeremy Saenz d8cf49f0dd Printing out version numbers
11 years ago
Jeremy Saenz 04490dabec Minor tweaks and cleanup
11 years ago
Jeremy Saenz 580cc011fd JMS #14: More help cleanup
11 years ago
Jeremy Saenz 63b9f2823a JMS #14: Improved help. Brought help commadn back to commands
11 years ago
Jeremy Saenz 6664835bc1 JMS #14: Moving toward having and app object
11 years ago