Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cliffy/command/types/command.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
File
import type { Command } from "../command.ts";import { StringType } from "./string.ts";
/** String type with auto completion of sibling command names. */export class CommandType extends StringType { /** Complete sub-command names of global parent command. */ public complete(cmd: Command, parent?: Command): string[] { return parent?.getCommands(false) .map((cmd: Command) => cmd.getName()) || []; }}