From cce64b64df3323197d4b62105e8d34e9a24eb208 Mon Sep 17 00:00:00 2001 From: rsteube Date: Thu, 21 Sep 2023 01:17:38 +0200 Subject: [PATCH] environment: added rust --- pkg/actions/env/rust.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pkg/actions/env/rust.go diff --git a/pkg/actions/env/rust.go b/pkg/actions/env/rust.go new file mode 100644 index 0000000000..3223015e32 --- /dev/null +++ b/pkg/actions/env/rust.go @@ -0,0 +1,26 @@ +package env + +import ( + "github.com/rsteube/carapace" + "github.com/rsteube/carapace/pkg/style" +) + +func init() { + _bool := carapace.ActionValuesDescribed("0", "disabled", "1", "enabled").StyleF(style.ForKeyword) + knownVariables["rust"] = variables{ + Condition: checkPath("rustc"), + Names: map[string]string{ + "RUST_TEST_THREADS": "The test framework Rust provides executes tests in parallel", + "RUST_TEST_NOCAPTURE": "Synonym for the --nocapture flag", + "RUST_MIN_STACK": "Sets the minimum stack size for new threads", + "RUST_BACKTRACE": "Produces a backtrace in the output of a program which panics", + }, + Completion: map[string]carapace.Action{ + "RUST_TEST_THREADS": carapace.ActionValues(), + "RUST_TEST_NOCAPTURE": _bool, + "RUST_MIN_STACK": carapace.ActionValues(), + "RUST_BACKTRACE": _bool, + }, + } + +}