abstract class fanc::FancCmd

sys::Obj
  util::AbstractMain
    fanc::FancCmd

Source

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
aliases

virtual Str[] aliases()

Source

Command name alises/shortcuts

appName

override Str appName()

Source

App name is "fanc {name}"

err

Int err(Str msg)

Source

Print error message and return 1

find

static FancCmd? find(Str name)

Source

Find a specific command or return null

info

Void info(Str msg)

Source

Print info message

list

static FancCmd[] list()

Source

List installed commands

log

virtual override Log log()

Source

Log name is "fanc"

name

abstract Str name()

Source

Command name

names

Str[] names()

Source

Name and aliases

printLine

Void printLine(Str line := "")

Source

Print a line to stdout

promptConfirm

Bool promptConfirm(Str msg)

Source

Prompt for a confirm yes/no

run

abstract override Int run()

Source

Run the command. Return zero on success

summary

abstract Str summary()

Source

Single line summary of the command for help