Commit Graph

335 Commits

Author SHA1 Message Date
Eric Bottard
bf10f679ec Add completion for JCommander 2017-08-08 11:52:32 +02:00
Eric Bottard
a277c53d8d Implement describe() for JCommander 2017-08-08 11:52:32 +02:00
Eric Bottard
e49ee885ef Use JCommander resolver in combination with others.
Prepare for implementation of describe()
2017-08-08 11:52:32 +02:00
Eric Bottard
14b2401374 Reconsider how input buffer is tokenized
Fixes #85
2017-08-08 11:52:32 +02:00
camilojc
7fd5390c29 Remove uses of "--" as constant prefix
Code now uses the prefixForMethod(...)
added sample usage of prefix in a @ShellMethod
2017-08-08 11:52:32 +02:00
Eric Bottard
8398b140ae Add JLine JNA for Windows shells 2017-08-08 11:52:32 +02:00
Eric Bottard
fb7b8262d4 Allow printing of the full stacktrace after an error
Fixes #70
2017-08-08 11:52:32 +02:00
Eric Bottard
ecd27de09a Fix implied boolean arity, even if annotation is used
Fixes #83
2017-08-08 11:52:32 +02:00
Eric Bottard
33c1474216 Small code cleanup 2017-08-08 11:52:32 +02:00
Eric Bottard
85a57018e8 Fix completion logic to only see words pertaining to args 2017-08-08 11:52:32 +02:00
Eric Bottard
109094c48c Don't escape/quote command names in completion proposals
Fixes #76
2017-08-08 11:52:32 +02:00
Eric Bottard
30b49ef501 Trim input buffer for command lookup
Fixes #79
2017-08-08 11:52:32 +02:00
Eric Bottard
bc81d3ed9c Use delegation rather than inheritance to decouple JLine
Fixes #78
2017-08-08 11:52:32 +02:00
Eric Bottard
50ba8de8b4 Decouple main REPL from JLine
Fixes #66
2017-08-08 11:52:32 +02:00
Eric Bottard
e4e66369ad Properly escape or quote values when doing completion
Fixes #54
2017-08-08 11:52:31 +02:00
Eric Bottard
15ed6ed0c0 Remove dependencies from parent pom
Fixes #44
2017-08-08 11:52:31 +02:00
Eric Bottard
ec83869c9f Introduce -standard and -standard-commands artifacts
Fixes #43
2017-08-08 11:52:31 +02:00
Eric Bottard
5a2658b0e4 Add some toString() implementations 2017-08-08 11:52:31 +02:00
Eric Bottard
65647ab3e0 Support line continuation
- either by ending a line with backslash and hitting return
- or but hitting return while inside quotes

Fixes #23
2017-08-08 11:52:31 +02:00
camilojc
f41b14f118 Updated the AttributedCharSequenceResultHandler to use the Terminal::writer instead of the System.out directly.
Fixes #59
2017-08-08 11:52:31 +02:00
Eric Bottard
c7da298478 Add support for flag parameters in descriptions
Fixes #55

Change one of standard command samples, to see effect on it
2017-08-08 11:52:31 +02:00
camilojc
72f52c65d8 Implement ParameterDescription for the LegacyParameterResolver
Fixes #8

updated Help to support parameters with empty keys (e.g. default key in Shell 1)
updated LegacyParameterResolver to avoid including a default value if none is provided

included some additional sample commands
2017-08-08 11:52:31 +02:00
Eric Bottard
3b9bbff2f2 Fix completion with arity != 1
Fixes #24

Handle arrays and primitives
2017-08-08 11:52:31 +02:00
camilojc
1874b7acdb Decoupling the MethodTargetResolver from the ApplicationContext
Fixes #39
2017-08-08 11:52:31 +02:00
Eric Bottard
011f6adb9a Add ValueProvider for command names, use in "help"
Also, add some cases to samples

Fixes #42

Add tests
2017-08-08 11:52:31 +02:00
Eric Bottard
f15fb0ba9d Fix maven versions 2017-08-08 11:52:31 +02:00
Eric Bottard
452c7dcb9f Refactor dependencies to avoid package tangles
Fixes #37
2017-08-08 11:52:31 +02:00
camilojc
9ca98cdd7d Moving the project to a multi-level maven project to allow for separation of the adapter from the core of the project
Fixes #28
2017-08-08 11:52:31 +02:00
Eric Bottard
3313140ecb Handle CTRL-C while editing
Fixes #22

Use ResultHandler for exits
Add unit test for CTRL-C capturing
2017-08-08 11:52:31 +02:00
Eric Bottard
929795c318 Fix README 2017-08-08 11:52:31 +02:00
Eric Bottard
199c13f0fd Update CONTRIBUTING.adoc 2017-08-08 11:52:31 +02:00
Eric Bottard
e8349c7a5b Upgrade to JLine 3.3.0 2017-08-08 11:52:31 +02:00
Eric Bottard
ea8908c019 Add Javadoc.
Fixes #27
2017-08-08 11:52:31 +02:00
Eric Bottard
a676a34299 Customize travis, add CodeCov
Add jacoco
2017-08-08 11:52:31 +02:00
Eric Bottard
d17869175f Add travis and CodeCov support
Fixes #25
2017-08-08 11:52:31 +02:00
Eric Bottard
95807f3f4b Add Maven wrapper
Fixes #26
2017-08-08 11:52:31 +02:00
Eric Bottard
7fe002a98a Skip failing test for now 2017-08-08 11:52:31 +02:00
Eric Bottard
277a07a951 WIP on Completer 2017-08-08 11:52:31 +02:00
Eric Bottard
f5c990468b Handle (no) result of null methods 2017-08-08 11:52:31 +02:00
Eric Bottard
ff68779937 Adds ResultHandler, a way to dynamically deal with method execution results 2017-08-08 11:52:31 +02:00
Eric Bottard
d68589a69f Add quit command 2017-08-08 11:52:31 +02:00
Eric Bottard
2f1a42bde0 Add help command 2017-08-08 11:52:31 +02:00
Eric Bottard
4c3af009cb Improve javadoc and DefaultParameterResolver tests 2017-08-08 11:52:31 +02:00
@fbiville
5c19707c06 Migrate tests to AssertJ 2017-08-08 11:52:31 +02:00
Eric Bottard
3e516d3bc6 Add new parameter resolver + positional params 2017-08-08 11:52:31 +02:00
Eric Bottard
c8bfff226f Add JCommander parameter resolver 2017-08-08 11:52:31 +02:00
Eric Bottard
938bd7cfa2 Add legacy and default resolvers 2017-08-08 11:52:31 +02:00
Eric Bottard
3cd5a1be3b Remove everything prior to Shell 2 migration 2017-08-08 11:04:41 +02:00
Eric Bottard
7424ccad05 Remove reference to 'hint' command
Fixes #127
2017-06-30 17:52:43 +02:00
Eric Bottard
e0a7dc642f Upgrade to gradle 2.10 2017-06-29 14:26:24 +02:00