diff --git a/private_dot_config/nushell/completions/cargo.nu b/private_dot_config/nushell/completions/cargo.nu new file mode 100644 index 0000000..c59e7b0 --- /dev/null +++ b/private_dot_config/nushell/completions/cargo.nu @@ -0,0 +1,64 @@ +def all_cargo_commands [] { + ^cargo --list | split row "\n" | skip 1 | split column " " --collapse-empty | get column1 -i +} + +def color_types [] { + [auto always never] +} + +export extern "cargo" [ + subcommand?: string@all_cargo_commands + -h --help + -V --version + --list + --explain: string + -v --verbose + --quiet + --color: string@color_types + --frozen + --locked + --offline + --config: string + -Z: string +] + +export extern "cargo build" [ + --quiet + -p --package: string + --workspace + --exclude: string + -v --verbose + --all + --color: string@color_types + -j --jobs: number + --frozen + --keep-going + --lib + --locked + --bin: string + --offline + --bins + --config: string + --example: string + --test: string + --tests + --bench: string + --benches + --all-targets + -r --release + --profile: string + -F --features + --all-features + --no-default-features + --target: string + --target-dir: string + --out-dir: string + --manifest-path: string + --ignore-rust-version + --message-format: string + --build-plan + --unit-graph + --future-incompat-report + --timings: string + -h --help +] diff --git a/private_dot_config/nushell/completions/completions.nu b/private_dot_config/nushell/completions/completions.nu index 07b89ae..815c41f 100644 --- a/private_dot_config/nushell/completions/completions.nu +++ b/private_dot_config/nushell/completions/completions.nu @@ -1,2 +1,3 @@ source ./podman.nu +source ./cargo.nu source ./git.nu \ No newline at end of file