From cb86805674e62b4d9a4b8af16a57c965a5916a28 Mon Sep 17 00:00:00 2001 From: Auca Coyan Date: Wed, 14 Aug 2024 16:11:59 -0300 Subject: [PATCH] :sparkles: completions for `bmc` client --- custom-completions/bmc/bmc-completions.nu | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 custom-completions/bmc/bmc-completions.nu diff --git a/custom-completions/bmc/bmc-completions.nu b/custom-completions/bmc/bmc-completions.nu new file mode 100644 index 00000000..a06611c4 --- /dev/null +++ b/custom-completions/bmc/bmc-completions.nu @@ -0,0 +1,84 @@ +# completions for botmaker-cli + +def "nu-complete list client actions" [] { + glob **/*.js --depth 2 | path basename +} + +export extern "bmc" [ + command?: string # command + --help # Show help + --version # Show version number +] + +# Run a Botmaker Client Action Script +export extern "bmc run" [ + source: string@"nu-complete list client actions" # client action to run + --help # Show help + --version # Show version number +] + +# Import a new bussiness from a token +export extern "bmc import" [ + apiToken: string # command + --help # Show help + --version # Show version number +] + +# Load context for a customer +export extern "bmc set-customer" [ + customerId: string # command + --help # Show help + --version # Show version number +] + +# Show change status +export extern "bmc status" [ + caName?: string@"nu-complete list client actions" # client action to check + --help # Show help + --version # Show version number +] + +# Diff client actions states +export extern "bmc diff" [ + caName: string@"nu-complete list client actions" # client action to check + code: string # command + --help # Show help + --version # Show version number + --vs-code(-v) # Open in vs-code +] + +# Pull incoming changes +export extern "bmc pull" [ + caName?: string@"nu-complete list client actions" # client action to pull + --help # Show help + --version # Show version number +] + +# Create a new client action +export extern "bmc new" [ + caName: string # command + --help # Show help + --version # Show version number +] + +# Push changes in client action +export extern "bmc push" [ + caName?: string@"nu-complete list client actions" # client action to push + --help # Show help + --version # Show version number +] + +# Publish changes in client action +export extern "bmc publish" [ + caName: string@"nu-complete list client actions" # client action to publish + --help # Show help + --version # Show version number +] + +# Renames the given client action +export extern "bmc rename" [ + caOldName: string@"nu-complete list client actions" # client action to rename + caNewName: string # new name + --help # Show help + --version # Show version number +]