struct Command::Flags
- Command::Flags
- Struct
- Value
- Object
Overview
Extend the flags struct to include the flag
Defined in:
file-watcher.cr:5file-watcher.cr:9
file-watcher.cr:15
file-watcher.cr:21
file-watcher.cr:27
file-watcher.cr:33
file-watcher.cr:37
file-watcher.cr:42
file-watcher.cr:47
Constant Summary
-
DESCRIPTIONS =
{} of String => String
-
SPECS =
{"__version__" => {kind: "bool", type: "Bool", default: "false", description: {"--version", "Displays the version of the current application."}, short: "nil", long: "version", is_required: true}, "__help__" => {kind: "bool", type: "Bool", default: "false", description: {"--help", "Displays help for the current command."}, short: "nil", long: "help", is_required: true}, "on_start" => {kind: "bool", type: "Bool", default: "false", description: {"--on-start, -x", "Run command on watcher start"}, short: "x", long: "on-start", is_required: true}, "all_events" => {kind: "bool", type: "Bool", default: "false", description: {"--all-events, -a", "Watch for all events"}, short: "a", long: "all-events", is_required: true}, "dirs" => {kind: "enum", type: "Array(String)", default: "Array(String).new", description: {"--dir, -d (default: Array(String).new)", "Watch for all events"}, short: "d", long: "dir", is_required: true}, "timeout" => {kind: "nil", type: "Float64", default: "0.5", description: {"--timeout, -t (default: 0.5)", "Minimum timeout between events (in seconds)"}, short: "t", long: "timeout", is_required: true}, "delay" => {kind: "nil", type: "Float64", default: "nil", description: {"--delay", "Delay after file change to execute command (in seconds)"}, short: "nil", long: "delay", is_required: false}, "events" => {kind: "enum", type: "Array(String)", default: "Array(String).new", description: {"--event, -e (default: Array(String).new)", "Event to watch for, one of: #{Constants::ALLOWED_EVENTS.join(", ")}"}, short: "e", long: "event", is_required: false}, "showcmd" => {kind: "bool", type: "Bool", default: "false", description: {"--showcmd", "Whether command name should be prefixed"}, short: "nil", long: "showcmd", is_required: true}, "noclear" => {kind: "bool", type: "Bool", default: "false", description: {"--noclear", "Maintain logs between restarts"}, short: "nil", long: "noclear", is_required: true}} of String => NamedTuple(kind: String, type: String, default: String, description: Tuple(String, String | ::Nil), short: String | ::Nil, long: String, is_required: Bool)
Constructors
Instance Method Summary
- #__help__
- #__version__
- #all_events
- #delay : Float64?
- #dirs
- #events
- #inspect(io)
- #noclear
- #on_start
- #showcmd
- #timeout
- #validate!(command)