type

FancCmd

abstract class FancCmd : AbstractMain

Fantom CLI compiler command plugin. To create:

  1. Define subclass of FancCmd
  2. Register type qname via indexed prop as "fanc.cmd" (if not in this pod)
  3. Annotate options and args using AbstractMain design

methods

aliases

Command name alises/shortcuts

appName

App name is "fanc {name}"

err

Print error message and return 1

find

Find a specific command or return null

info

Print info message

list

List installed commands

log

Log name is "fanc"

name

Command name

names

Name and aliases

printLine

Print a line to stdout

promptConfirm

Prompt for a confirm yes/no

run

Run the command.

summary

Single line summary of the command for help

Slot Details

aliases

virtual Str[] aliases()

Command name alises/shortcuts

appName

override Str appName()

App name is "fanc {name}"

err

Int err(Str msg)

Print error message and return 1

find

static FancCmd? find(Str name)

Find a specific command or return null

info

Void info(Str msg)

Print info message

list

static FancCmd[] list()

List installed commands

log

virtual override Log log()

Log name is "fanc"

name

abstract Str name()

Command name

names

Str[] names()

Name and aliases

printLine

Void printLine(Str line := "")

Print a line to stdout

promptConfirm

Bool promptConfirm(Str msg)

Prompt for a confirm yes/no

run

abstract override Int run()

Run the command. Return zero on success

summary

abstract Str summary()

Single line summary of the command for help