Commit graph

607 commits

Author SHA1 Message Date
bogem
6e17f4e2c5 Fix typos 2016-08-20 12:04:53 +05:00
bogem
ec452170d2 Fix error messages in cobra_test 2016-08-20 12:02:26 +05:00
Eric Paris
7c674d9e72 Merge pull request #313 from euank/swift-as-a-cobra-hidden-as-a-ninja
Display neither hidden nor deprecated flags in bash completion
2016-08-02 18:37:37 -04:00
Euan Kemp
40e19b3f3b Don't display deprecated flags in bash completions 2016-08-02 15:01:33 -07:00
Euan Kemp
75daccd5b8 Don't display hidden flags in bash completions 2016-08-02 14:49:33 -07:00
Eric Paris
f62e98d28a Merge pull request #300 from cshung/master
Include instruction for building the cobra tool in README.md
2016-07-22 04:15:47 -04:00
Eric Paris
dbb7c2d02e Merge pull request #308 from fabianofranz/restore_backwards_compatibility
Restore Help() and Usage() for backwards compatibility
2016-07-20 22:00:57 -04:00
Fabiano Franz
ded646f978 Restore Help() and Usage() for backwards compatibility 2016-07-20 12:02:56 -03:00
Bjørn Erik Pedersen
9d9ce1213e Bump Travis to Go 1.6.3 2016-07-18 23:49:35 +02:00
Eric Paris
b24564e919 Merge pull request #305 from fabianofranz/expose_out
Fixes how we expose help and usage and expose output without making assumptions
2016-07-15 19:55:49 -04:00
Fabiano Franz
d6bf4ef243 Don't expose Usage() and Help() - our interfaces are UsageFunc, HelpFunc and UsageString 2016-07-15 17:18:59 -03:00
Fabiano Franz
20217d8f5e Expose OutOrStdout and OutOrStderr and don't make assumptions if output is not set 2016-07-15 17:18:47 -03:00
Eric Paris
a272c3cbd5 Merge pull request #303 from fabianofranz/testing_help_exiting_1
Help command must use Stdout instead of Stderr
2016-07-08 16:24:02 -04:00
Fabiano Franz
77530f537e Help command must use Stdout instead of Stderr 2016-07-06 12:51:57 -03:00
Andrew Au
cb51c97a4e Include instruction for building the cobra tool in README.md 2016-06-29 21:34:17 -07:00
Eric Paris
6a8bd97bdb Merge pull request #294 from dnephin/fix_man_page_gen_bugs
Fix man page gen bugs
2016-06-21 16:47:55 -04:00
Daniel Nephin
e291587027 Cretea a new GenManTree function that takes an options struct.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-06-21 14:47:14 -04:00
Daniel Nephin
97206b3170 Use the correct man page section for the filename
Also make header mutation cleaner.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-06-21 14:30:54 -04:00
Daniel Nephin
112c7dca3a Hide deprecated shorthand flags in man page generation. 2016-06-21 14:30:26 -04:00
Daniel Nephin
29c0a1f42e Use the correct UseLine for the man page synposis.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-06-20 17:27:41 -04:00
Daniel Nephin
7faa7fcdd2 Merge persistent flags before checking for a help flag.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-06-20 14:58:44 -04:00
Eric Paris
bc81c21bd0 Merge pull request #293 from andreykurilin/sort_commands
Sort commands by their names
2016-06-15 10:36:14 -04:00
Andrey Kurilin
ab97c7a63a Sort commands by their names
The slice of commands are sorted now automatically while Commands are called.
To turn off this feature, EnableCommandSorting variable is added.
2016-06-15 17:27:34 +03:00
Eric Paris
1238ba19d2 Merge pull request #290 from joe2far/patch-1
Fixed typos in README and docstring
2016-06-07 08:43:46 -04:00
Eric Paris
c21ee9da52 Merge pull request #288 from eparis/flags-vs-commands
Do not display bash commands if local flag specified
2016-06-07 08:37:00 -04:00
joe2far
719241171d Fixed typos in README and docstring 2016-06-07 11:50:48 +01:00
Eric Paris
f447048345 Merge pull request #289 from markbates/disable-flags
added a flag to disable flags
2016-06-04 00:47:32 -04:00
Mark Bates
dc6e9ece6f added a flag to disable flags 2016-06-03 20:25:52 -04:00
Eric Paris
7bf964e5b6 Do not show subcommands in bash completion if a local flag was specified
If a user specifies a flag to a command which doesn't make sense to a
subcommand do not show subcommands as a suggestion.

This also changes things to show both 'required flags' and 'commands'
instead of only 'required flags'
2016-06-03 12:44:58 -04:00
Eric Paris
ecc7ea6969 Show both commands and 'required flags' instead of only 'required flags' 2016-06-03 12:44:54 -04:00
Eric Paris
a5f153e19b add vim to gitignore 2016-06-03 10:18:59 -04:00
Eric Paris
f368244301 Merge pull request #278 from kevintpeng/patch-1
Fixed Small Comment Typo
2016-05-17 13:19:29 -04:00
Kevin Peng
6096009e8d Fixed Small Comment Typo
small error in function description
2016-05-17 13:17:01 -04:00
Bjørn Erik Pedersen
0f866a6211 Get Travis config up-to-date 2016-05-09 11:37:22 +02:00
Wesley Merkel
336d629de0 Add godoc badge to README.md (#271) 2016-04-30 09:18:32 -04:00
John Schnake
e14e47b7a9 Issue #267: Ensure hidden flags/subcommands do not change help
If a command has one flag which is hidden, it should not, for
instance, show the `Flags: ` heading.  Likewise there are other
items in the help template which should respect hidden/deprecated
state.
2016-04-27 13:33:23 -04:00
Ian Walter
9a8186dbb5 Improving createLicenseFile function
Also fixing typo in README example.
2016-04-27 12:03:26 -04:00
Ian Walter
d811f40c6a Adding custom license functionality
* Refactoring code that unnecessarily declares a map before making it.
* Cleaning up gpl3 formatting to match other licenses.
* Adding functionality that allows specifying custom license header
  and text in cobra config.
* Using license header and text as templates so that they can use
  template variables (for custom and gpl3 licenses).
* Adding ability to specify no license.
* Adding custom license example to README.
2016-04-27 12:03:26 -04:00
Rob Terhaar
3dc021e8c7 add gpl2 license 2016-04-27 12:01:30 -04:00
Rob Terhaar
8bf317ef60 add gpl2 license 2016-04-27 12:01:30 -04:00
Eric Paris
4c05eb1145 Merge pull request #265 from sttts/sttts-shellcheck
Run shellcheck on bash completion
2016-04-03 09:08:35 -05:00
Dr. Stefan Schimanski
defeccc04d Run shellcheck on bash completion 2016-04-02 23:16:12 +02:00
Eric Paris
60267ae24d Merge pull request #257 from sttts/sttts-noun-aliases
Add noun aliases
2016-04-02 09:29:34 -05:00
Dr. Stefan Schimanski
1a0a490d76 Remove plural handling and add aliases for nouns in completion 2016-04-02 12:39:19 +02:00
Eric Paris
2ccf9e982a Merge pull request #264 from kkirsche/patch-1
Update template per to match previous pr with golint fix
2016-04-01 21:14:51 -05:00
Kevin Kirsche
3e71c61197 Update init per golint
X-Ref: #258
2016-04-01 21:29:12 -04:00
Eric Paris
b0d571e7d5 Merge pull request #260 from ianwalter/code-cleanup
Fixing golint warnings
2016-03-31 09:32:10 -05:00
Ian Walter
a0bd6c17b3 Fixing golint warnings
* Moving final return outside of if-else
* Removing type declarations that Go can infer from values
* Cleaning up some existing comments
* Changing snake_case variables to camelCase
2016-03-31 09:53:34 -04:00
Eric Paris
ee150b4fa2 Merge pull request #258 from kkirsche/patch-1
Update root.go to fix golint bug with comment
2016-03-30 16:59:46 -05:00
Kevin Kirsche
f643f707c9 Update root.go to fix golint bug with comment
Fix the name in the comment to fix a golint bug by not having the variable name begin the comment.
2016-03-30 17:50:52 -04:00