Function: completionCommand()
completionCommand(
args):RunResult
Run the completion command.
Parameters
args
string[]
The arguments after the completion subcommand token; the first is the shell name.
Returns
A RunResult: the completion script on stdout (exit 0), or a value-free usage
error (exit 2) when the shell is missing or unrecognised.
Example
import { completionCommand } from "@cosyte/cli";
completionCommand(["bash"]).exit; // => 0
completionCommand(["powershell"]).exit; // => 2