-
Notifications
You must be signed in to change notification settings - Fork 445
Closed
Labels
theme: compatibilityIssues related to binary and source backwards compatibilityIssues related to binary and source backwards compatibilitytheme: integrationAn issue or change related to integration with other frameworks, shells or operating systemsAn issue or change related to integration with other frameworks, shells or operating systemstype: API 🔌type: enhancement ✨
Milestone
Description
I’m not sure if this is supposed to work, but it would be very cool if it did.
@Grab('info.picocli:picocli-groovy:4.5.1')
@GrabConfig(systemClassLoader = true)
@Command(name = "picocli",
mixinStandardHelpOptions = true,
version = '1.0.0',
subcommands = [ HelpCommand.class ],
description = 'sub command test')
@picocli.groovy.PicocliScript
import static picocli.CommandLine.*
@Command(description = "Record changes to the repository")
void commit(@Option(names = ["-m", "--message"]) String commitMessage,
@Option(names = "--squash", paramLabel = "<commit>") String squash,
@Parameters(paramLabel = "<file>") File[] files) {
println "commit ${files}"
}
println "done"The groovy script seems to pick up the sub command in the usage help, but i can’t get the script to call the commit method.
./picocli.groovy --help
Usage: picocli [-hV] [COMMAND]
sub command test
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
commit Record changes to the repository
./picocli.groovy commit picocli.groovy
done
Metadata
Metadata
Assignees
Labels
theme: compatibilityIssues related to binary and source backwards compatibilityIssues related to binary and source backwards compatibilitytheme: integrationAn issue or change related to integration with other frameworks, shells or operating systemsAn issue or change related to integration with other frameworks, shells or operating systemstype: API 🔌type: enhancement ✨