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, + }, + } + +}