From ad16739d15f80debf9c46c9c01b46340a818d30a Mon Sep 17 00:00:00 2001 From: rsteube Date: Mon, 25 Sep 2023 22:06:59 +0200 Subject: [PATCH] env: added maven --- pkg/actions/env/maven.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pkg/actions/env/maven.go diff --git a/pkg/actions/env/maven.go b/pkg/actions/env/maven.go new file mode 100644 index 0000000000..93922b5dc2 --- /dev/null +++ b/pkg/actions/env/maven.go @@ -0,0 +1,22 @@ +package env + +import ( + "github.com/rsteube/carapace" + "github.com/rsteube/carapace-bin/pkg/conditions" + "github.com/rsteube/carapace-bridge/pkg/actions/bridge" +) + +func init() { + knownVariables["maven"] = variables{ + Condition: conditions.ConditionPath("mvn"), + Variables: map[string]string{ + "MAVEN_OPTS": "parameters used to start up the JVM running Maven", + "MAVEN_ARGS": "arguments passed to Maven before CLI arguments", + }, + VariableCompletion: map[string]carapace.Action{ + "MAVEN_OPTS": bridge.ActionCarapaceBin("java").Split(), + "MAVEN_ARGS": bridge.ActionCarapaceBin("mvn").Split(), + }, + } + +}