Ian Walter
36bbf32d1d
Merge branch 'master' of github.com:ianwalter/cobra
2016-05-09 15:30:18 -04:00
Ian Walter
22e4fd4c85
Merge branch 'master' of https://github.com/spf13/cobra
2016-05-09 15:29:55 -04:00
Bjørn Erik Pedersen
0f866a6211
Get Travis config up-to-date
2016-05-09 11:37:22 +02:00
Ian Walter
7e288525f0
Making buildPath arg more descriptive
2016-05-03 22:16:18 -04:00
Ian Walter
02a0b7db0c
Fixing addCmd templating and finishing #266
2016-05-03 22:09:50 -04:00
Ian Walter
784ab4d6eb
Reversing cmd creation order so child cmds get added properly
2016-05-03 00:56:28 -04:00
Ian Walter
274ca840ae
Fixing removal of filepath.join from writeTemplateToFile
2016-05-02 22:37:29 -04:00
Ian Walter
034973cce1
Merge branch 'master' of github.com:ianwalter/cobra
2016-05-02 22:04:56 -04:00
Ian Walter
ecbac3bbf6
Merge branch 'master' of https://github.com/spf13/cobra
2016-05-02 22:04:39 -04:00
Wesley Merkel
336d629de0
Add godoc badge to README.md ( #271 )
2016-04-30 09:18:32 -04:00
Ian Walter
b4c7072b6b
Checking if cmd file exists before trying to create it
2016-04-28 21:23:46 -04:00
Ian Walter
a6cbaf61ec
Working on #266 : Ability to add nested commands
...
* Modified `cobra add` command to be able to parse argument into nested command structure
* Modified `createCmdFile` function to accept cmdPath
* Modified cmdFile template to specify package name and to TitleCase
command names so that they can be accessed by child packages.
* Simplified `writeTemplateToFile` function so that just the file path
is passed instead of base path and filename.
2016-04-27 22:44:53 -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
Eric Paris
c678ff029e
Merge pull request #256 from sttts/sttts-fix-bash-escaping
...
Fix escaping of % in bash code strings
2016-03-22 12:10:42 -05:00
Dr. Stefan Schimanski
a23d903a12
Fix escaping of % in bash code strings
2016-03-22 17:44:59 +01:00
Eric Paris
966e6048eb
Merge pull request #230 from garthk/fix-man-see-also
...
Ensure SEE ALSO list has no leading comma.
2016-03-21 19:23:55 -05:00
Eric Paris
57021c6b4d
Merge pull request #244 from apriendeau/silence-errors-readme
...
updates readme to Explain SilenceErrors and SilenceUsage #225
2016-03-21 19:22:44 -05:00
Eric Paris
d6b481239e
Merge pull request #255 from sttts/sttts-bash-completion-flag-equal
...
Advanced custom bash completion of flags
2016-03-21 19:22:24 -05:00
Dr. Stefan Schimanski
ea9a77d312
Add support for plural nouns in bash completion
2016-03-21 08:05:54 +01:00
Dr. Stefan Schimanski
8092588fb8
Add custom bash flag completion
2016-03-21 08:05:54 +01:00
Dr. Stefan Schimanski
7d556a0974
Enable bash completion after --flag= or --flag=abc
2016-03-21 08:05:49 +01:00
Eric Paris
1bacefc9a2
Merge pull request #254 from fabianofranz/optional_options_at_the_end_of_usage
...
Must only add "[flags]" to the end of usage if not yet present
2016-03-15 16:50:08 -05:00
Fabiano Franz
16b7ba55fb
Must only add "[flags]" to the end of usage if not yet present
2016-03-15 18:22:20 -03:00
Austin Riendeau
e21e5f0b09
updates readme to Explain SilenceErrors and SilenceUsage #225
2016-02-18 13:57:07 -07:00
Anthony Fok
65a708cee0
Allow bash-completion to work with full-path executable
2016-02-08 17:06:27 -05:00
Jonathan Reyna
1ef0913976
Use nil instead of len for arg check.
...
This honors the SetArgs() call
2016-02-08 17:04:25 -05:00
Steve Francia
bbdcadf158
Add Swarm to Cobra user list
2016-02-08 17:02:59 -05:00
Eric Paris
04d02e3184
Merge pull request #241 from bogem/typo
...
Fix typo in README
2016-02-06 12:39:43 -05:00
bogem
64cc91ac9b
Fix typo in README
2016-02-06 17:38:32 +01:00
Anthony Fok
801364aa15
Skip "bash: declare: -A: invalid option" error gracefully
...
The use of "declare -A flaghash" (associative array) was introduced
in PR #205 , which works perfectly for Bash 4.x, but OS X insists on
shipping a very outdated Bash 3.2.x.
This patch hides the "bash: declare: -A: invalid option" error message
and allows the bash completion script to continue gracefully on
OS X, albeit without the benefit of the new feature in PR #205 .
Fixes #240
2016-02-05 13:04:36 +08:00
Garth Kidd
57f473263e
Add explicit doc.GenMan SEE ALSO test covering #229
2016-01-21 12:12:26 +11:00
Garth Kidd
cb8496d6b2
Ensure SEE ALSO list has no leading comma, fixing #229
2016-01-21 12:11:56 +11:00
Eric Paris
8e91712f17
Merge pull request #228 from garthk/fix-doc-generation
...
Fix doc generation and its documentation
2016-01-16 22:09:38 -05:00
Garth Kidd
356750645f
Update doc generation examples. Fixes #227 .
2016-01-17 11:29:42 +11:00
Garth Kidd
8e6aca4182
Use filepath.Join, not string math. Fixes #226 .
2016-01-17 11:25:20 +11:00
Eric Paris
9c93009019
Merge pull request #223 from mattnenterprise/doc-link-fixes
...
Fix links to markdown and man page docs
2016-01-13 22:06:19 -05:00