Jesse Szwedko
f585ec7cb8
Remove reordering of flags and arguments
...
This was introduced by #36 , but only worked in the specific case of all
arguments being passed before all flags. If the user mixed them, they
ended up with odd parsing behavior where the arguments were reordered
(causing #103 and #355 ).
Given the tradeoffs I think we should remove support for flag
reordering.
Fixes #103
Fixes #355
2016-05-07 16:36:54 -07:00
Jesse Szwedko
eb8680b7d7
Merge pull request #392 from codegangsta/string-slice-overwrite-on-set
...
Overwrite slice flag defaults when set
2016-05-05 08:42:14 -07:00
Dan Buch
a4590caea5
Merge remote-tracking branch 'origin/v2' into string-slice-overwrite-on-set
2016-05-05 10:16:58 -04:00
75b97d09d9
Merge pull request #390 from codegangsta/readme-example-touchup
...
Assert output in some README examples
2016-05-04 20:04:10 -04:00
Dan Buch
11ad2b36c8
Assert output in some README examples
2016-05-04 19:41:33 -04:00
Dan Buch
a1e5328e30
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160
2016-05-03 05:25:07 -04:00
Jesse Szwedko
839f07bfe4
Merge pull request #381 from codegangsta/pluggable-flag-printer
...
Allow for pluggable flag-level help text formatting
2016-05-02 21:17:00 -07:00
b14dcdb7b9
TRIVIAL the letter "a"
2016-05-02 21:20:23 -04:00
Dan Buch
cd92adcb75
Further simplifying default flag stringer func
2016-05-02 19:58:16 -04:00
Dan Buch
6089d723a8
Use existing prefixedNames
func
2016-05-02 19:52:39 -04:00
Dan Buch
7de151883c
Added more notes about usage formatting changes
2016-05-02 19:48:35 -04:00
Dan Buch
e56207bd51
Merge branch 'vieux-change_varargs_usage' into pluggable-flag-printer
2016-05-02 19:45:56 -04:00
Dan Buch
2e4d25db14
Merge branch 'change_varargs_usage' of https://github.com/vieux/cli into vieux-change_varargs_usage
2016-05-02 19:45:21 -04:00
Dan Buch
69a8e25f3d
Make flag usage rendering more consistent; show default values
2016-05-02 19:42:08 -04:00
Dan Buch
23af5dd643
Rename flag stringer func bits for clarity, consistency
2016-05-02 13:07:57 -04:00
Dan Buch
22773b14c1
Allow for pluggable flag-level help text formatting
...
by defining `cli.DefaultFlagStringFunc` with a default value that uses
`withEnvHint`, conditionally running a given flag's `FormatValueHelp` if
present.
Closes #257
2016-05-02 13:05:21 -04:00
415b5e766a
Merge pull request #380 from codegangsta/readme-cli-refs
...
Change refs from `cli.go` to cli
2016-05-02 12:06:58 -04:00
Dan Buch
5c36fa18d9
Change refs from cli.go
to cli
...
since the days of this being a single-file library are long gone.
2016-05-02 11:51:54 -04:00
d69b4400b5
Merge pull request #379 from codegangsta/v1.16.0-prep
...
Version 1.16.0 prep
2016-05-02 11:49:06 -04:00
Dan Buch
edc8458637
Merge branch 'PaulMakepeace-fix-err-assertion' into v1.16.0-prep
2016-05-02 11:42:18 -04:00
Dan Buch
ecf21a7a09
Merge branch 'fix-err-assertion' of https://github.com/PaulMakepeace/cli into PaulMakepeace-fix-err-assertion
2016-05-02 11:41:51 -04:00
Dan Buch
fe67cb0f3d
Add note about error handling fix, prep 1.16.0 section
2016-05-02 11:41:01 -04:00
4cb9a7a5bb
Merge pull request #378 from codegangsta/exit-error-bug-376
...
Ensure HandleAction/HandleExitCoder work correctly with *ExitError
2016-05-02 11:36:18 -04:00
Dan Buch
4b4c07bd4f
Ensure HandleAction/HandleExitCoder work correctly with *ExitError
...
Closes #376
2016-05-02 11:32:22 -04:00
Gert-Jan Timmer
a90e2e4ff1
Fix #376 NewExitError not working, reflect vals[0] cast to Interface() was missing
2016-05-02 17:06:14 +02:00
Paul Makepeace
f90241a6a3
Assert type against actual return val's interface.
...
Exit code example produces now correctly,
https://github.com/codegangsta/cli#exit-code
```
$ ./ec --ginger-crouton=false
it is not in the soup
$ echo $?
86
$
```
2016-05-01 20:58:59 -07:00
ff84ca213d
Merge pull request #374 from codegangsta/kytrinyx-action-err
...
Merging #135 😻
2016-05-01 10:34:16 -04:00
Dan Buch
1cda555a05
Merge branch 'action-err' of https://github.com/kytrinyx/cli into kytrinyx-action-err
2016-05-01 10:26:54 -04:00
fd7bf3b85f
Merge pull request #373 from codegangsta/doc-custom-help
...
Add some explicit docs about help text customization
2016-05-01 10:10:46 -04:00
Dan Buch
b738841df8
Add some explicit docs about help text customization
2016-05-01 10:06:12 -04:00
e0d7cbbe2c
Merge pull request #372 from codegangsta/deprecation-cleanups
...
Cleaning up the recently-introduced deprecations
2016-05-01 09:18:56 -04:00
784038bca2
Merge pull request #371 from codegangsta/harshavardhana-hidden-flags
...
Merging #201 - @harshavardhana's hidden flags impl (and more!)
2016-05-01 09:18:41 -04:00
Dan Buch
007295e509
Cleaning up the recently-introduced deprecations
...
to ensure the intent, responsibility, and migration path are all more clear.
2016-05-01 09:09:54 -04:00
Dan Buch
9584555150
Include details of hidden flag impl in CHANGELOG
2016-05-01 08:44:01 -04:00
Dan Buch
fed78b8bab
Rework of hidden flag impl plus some Action func corrections
2016-05-01 08:36:17 -04:00
Harshavardhana
99431669d0
New `Hide
` variable for all Flags
...
This is a way to provide hidden flags for app, command and subcommands
For example:
--generate-bash-completion global flag shouldn't be printed along
with other flags as it might generally confuse people into thinking
that 'generate' in-fact would generate a bash completion file for them
to be used along with their app.
Also in general one would want to hide some flags for their apps.
2016-04-30 22:24:27 -04:00
879acab1d0
Merge pull request #369 from codegangsta/v1.15.0-prep
...
Prepping v1.15.0 release
2016-04-30 13:53:46 -04:00
Dan Buch
a9afed5b15
Prepping v1.15.0 release
2016-04-30 13:48:08 -04:00
aaac36ecb9
Merge pull request #368 from codegangsta/yaml-nested-changelog
...
Add a note to CHANGELOG about dot-delimited YAML key lookup
2016-04-30 13:46:42 -04:00
Dan Buch
896d2fd3c1
Add a note to CHANGELOG about dot-delimited YAML key lookup
2016-04-30 13:27:11 -04:00
15d4455a61
Merge pull request #365 from roboll/nested-flags
...
altsrc: allow nested defaults in yaml files
2016-04-30 13:25:48 -04:00
Dan Buch
1fb52b3bce
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160
2016-04-30 13:13:02 -04:00
9f8c5004f2
Merge pull request #367 from codegangsta/bryanl-bryanl-set-context-values
...
Merging #234 set context values
2016-04-30 12:31:31 -04:00
Dan Buch
f3b589e892
Remove unreachable code
2016-04-30 12:22:32 -04:00
Dan Buch
e059dc8188
Implement *Context.GlobalSet + relevant CHANGELOG entry
2016-04-30 11:46:47 -04:00
Dan Buch
4edb5c9a6b
Merge branch 'bryanl-set-context-values' of https://github.com/bryanl/cli into bryanl-bryanl-set-context-values
2016-04-30 11:25:05 -04:00
b4054ddd3c
Merge pull request #366 from codegangsta/metadata-note
...
Minor changelog update bits
2016-04-30 11:12:44 -04:00
Dan Buch
e2161d7f64
Minor changelog update bits
2016-04-30 09:54:44 -04:00
e671f0b23b
Merge pull request #339 from jack230230/master
...
Add App.Metadata
2016-04-30 09:36:46 -04:00
663fc0b623
Merge pull request #361 from codegangsta/txgruppi-develop
...
Optional exit code support
2016-04-30 08:14:08 -04:00