179 Commits (main)

Author SHA1 Message Date
Yogesh Lonkar 58a072d573 Add bash completion support for flags
5 years ago
mingrammer a0453b2200 Fix the unaligned indents for the commands that have no categories
5 years ago
teresy 21dfc6eb83 Remove redundant nil checks
6 years ago
Dan Buch 5fc8124af1
Merge branch 'master' into merging-jereksel-zsh
6 years ago
Alan D. Cabrera 1d334f10ce Add newline before command categories
7 years ago
Dan Buch 744fdb45b5
Resolve conflict in completion flag check better
7 years ago
Dan Buch 65b801c818
Resolve remaining test errors for v1 => v2 merge
7 years ago
Dan Buch 47a412375f
Resolved compile-time errors since merging from v1
7 years ago
Dan Buch a61867e5e6
Merge remote-tracking branch 'origin/v1' into merging-from-v1
7 years ago
Dan Buch 688c5a9d4f Merge branch 'master' into merging-jereksel-zsh
7 years ago
Jesse Szwedko 48db8e2435 Display UsageText on Commands and Subcommands
7 years ago
Jesse Szwedko 74811faef3 Merge branch 'master' into extra-info
7 years ago
Harshavardhana dd3849a7e6 Add tests as requested.
7 years ago
Harshavardhana baa33cb888 Add support for ExtraInfo.
7 years ago
Harshavardhana f7d6a07f2d Add support for custom help templates.
7 years ago
Joe Richey joerichey@google.com 1794792adf Add ability to use custom Flag types
7 years ago
Nuruddin Ashr 8b9345ec9d Remove the error return signature
7 years ago
Joe Richey 0083ae8732 Usage/Description/ArgsUsage correctly copied when using subcommand
7 years ago
Dan Buch 7250c97913 Merge branch 'master' into merging-jereksel-zsh
8 years ago
Joshua Rubin 2da42640ad
Merge remote-tracking branch 'origin/master' into completion_fix
8 years ago
Joshua Rubin 8dd1962f7b
change "complete" to "shellComplete"
8 years ago
Jesse Szwedko 0113f56d10 If no action is specified on the command or app, print the help documentation
8 years ago
Joshua Rubin ea3df26e64
make shell autocomplete more robust
8 years ago
Jesse Szwedko 83497d2cda Merge remote-tracking branch 'origin/master' into v2-merge
8 years ago
W. Trevor King 3c2bce5807 help: Cleanup AppHelpTemplate trailing whitespace
8 years ago
W. Trevor King c4a46a7df2 app: Add App.Description
8 years ago
Antoine Eiche 94bc26fd1c Refactoring names from bash to shell
8 years ago
Antoine Eiche 7640bef0eb Add --init-completion flag to print completion code
8 years ago
Dan Buch 363d9c9a31
Add a hack so that zsh completion only runs for zsh
8 years ago
Andrzej Ressel ceeebaba04 [PoC] Improve zsh autocompletions
8 years ago
Jesse Szwedko 65da20beab Correctly show help message if `-h` is provided to subcommand
8 years ago
Dan Buch d5abb165ee
Merge remote-tracking branch 'origin/master' into merging-from-v1
8 years ago
James Cunningham e97f74a570
fix ActionFunc signature of ShowAppHelp action
8 years ago
Tianon Gravi a121e978f7 Switch "printHelp" tabwriter padchar to space
8 years ago
Dan Buch 3d75e9e711
Go with interfaces + private opaque types
8 years ago
Dan Buch cd10b49473
Minimize struct copying
8 years ago
Dan Buch 81fcf706ea
Replace all "stringly typed" fields with slice equivalents
8 years ago
Dan Buch bef835d455
Remove all Context.Global* methods
8 years ago
Dan Buch b9d96954ca
Fix command alias printing in help text
8 years ago
Matt Farina 2f110bd745 Cleaned up exported func comments per golint
8 years ago
Dan Buch 5a5fa990e1
Merge remote-tracking branch 'origin/master' into exit-nonzero-for-unknown-subcommand
8 years ago
Dan Buch 97d2df6dd7
Merge remote-tracking branch 'origin/master' into psmit-hidden_command
8 years ago
Jesse Szwedko 592f1d97e5 Exit non-zero if a unknown subcommand is given
8 years ago
Matt Farina 6f0b442222 Update to ErrWriter and make available on app
8 years ago
Matt Farina 2a256d4c53 Provide a variable for writing output with a default of os.Stderr
8 years ago
Dan Buch cc481d6b0e
Adjust command hiding to use similar convention as hidden flags
8 years ago
Dan Buch 5c641d69b4
Merge branch 'hidden_command' of https://github.com/psmit/cli into psmit-hidden_command
8 years ago
Dan Buch fed78b8bab
Rework of hidden flag impl plus some Action func corrections
8 years ago
Harshavardhana 99431669d0
New ``Hide`` variable for all Flags
8 years ago
Dan Buch b7329f4968
Switch from multi-return with exit codes to ExitCoder check
8 years ago
Dan Buch 10c8309d84
Merge branch 'develop' of https://github.com/txgruppi/cli into txgruppi-develop
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
Jesse Szwedko d5f087da9d Merge pull request #289 from KSubedi/master
8 years ago
Matt Butcher 54b6cca78e Remove panic from help.
8 years ago
Kaushal Subedi 8b46886de8 added flag to have a custom text on the USAGE section of help
9 years ago
Ryan Graham 732e97aee8 only display app version and help message once
9 years ago
elij db7af859d2 make help and version parsing use actual specified values
9 years ago
Tristan Zajonc aced6e8739 fix tests
9 years ago
Tristan Zajonc ecb0b5ac0a improve help by including parent command for subcommands
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
Brian Goff 758ad1e836 Sets a subcommand's parent cmd
9 years ago
Martin Falatic 8cae4991af Fixing more formatting
9 years ago
Martin Falatic 4d3820c145 If there are no commands, don't show Commands section. Also fixed Copyright section formatting.
9 years ago
Martin Falatic 595c055010 If Version is an empty string, suppress version output in usage help.
9 years ago
Jesse Szwedko 7ad88c2740 Merge pull request #238 from polds/copyright
9 years ago
Peter Olds 4a11a6ba05 Remove whitespace #238
9 years ago
Peter Olds 2726643347 Add the ability to add a copyright
9 years ago
Jesse Szwedko 2272dad83e Version and help check should look for local flags too
9 years ago
Victor Vieux 7c041f5811 do not print 'AUTHOR(S):' is there is no author
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
陈小玉 84630daaf4 Update help.go
9 years ago
jszwedko bf65971a6a Add `Command.Aliases` and deprecate `Command.ShortName`
9 years ago
Jesse Szwedko 3e0905345c Merge pull request #186 from nrdufour/master
9 years ago
Nicolas Dufour 4be878bffc Fixing the issue with a command with subcommands not showing help message.
9 years ago
Harrison c6592bb487 app, help: add backwards compatibility for Authors
9 years ago
Peter Smit 5308b4cd0f Allow commands to be hidden from help and autocomplete
9 years ago
Harrison 3d7183307a app, help: add support for multiple authors
9 years ago
Dan Buch a14c5b47c7 Merge pull request #154 from codegangsta/allow-writer-to-be-set
10 years ago
Jesse Szwedko e7849f9239 Merge pull request #128 from nbjahan/patch-1
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
pivaldi 59ef9567ae Fix bash completion for deep level subcommands
10 years ago
Nima Jahanshahi 4db56687fa Fixed ShowSubcommandHelp
10 years ago
Josh Mervine 120f0688a4 Merge remote-tracking branch 'parent/master'
10 years ago
Jeremy Saenz ec11175ac1 Merge pull request #123 from AudriusButkevicius/help
10 years ago
Audrius Butkevicius 527fbe0671 Unify template formatting
10 years ago
Audrius Butkevicius fcc1613bb5 Do not show empty description section
10 years ago
Audrius Butkevicius e38bac8225 Print author
10 years ago
Audrius Butkevicius bc02933ea4 Fix Subcommand help text
10 years ago
Audrius Butkevicius d6d4e6448b Hide "Options" sections in help, if no flags are defined
10 years ago
Joshua Mervine 5821632000 Adding VersionPrinter and tests.
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