Tabular::Tablet
Represents a parameter whose name and aliases may be suggested and matched during tab completion.
Constants
NONE = Tablet.new(:none, directives: :no_file)
Basically, [Tablet?][Tabular::Tablet] minus the baggage.
Constructors
new(kind : Kind, name : String = "", aliases = [] of String, help = "", directives : Directable | Nil = nil, delimiters = Tabular.delimiters, repeatable : Bool = false)
Create a new [Tablet][Tabular::Tablet].
- kind: See [
#kind][Tabular::Tablet#kind]. - name: See [
#name][Tabular::Tablet#name]. - aliases: See [
#aliases][Tabular::Tablet#aliases]. - help: See [
#help][Tabular::Tablet#help]. - directives: See [
#directives][Tabular::Tablet#directives]. - delimiters: Ad hoc delimiters that will override [
Habit#delimiters][Tabular::Habit#delimiters].
Instance methods
Yield suggestions for any names that contain word.
directives
Additional directives the [Tablet][Tabular::Tablet] will send to the shell if suggested.
match!(word : String)
Returns self if word is an exact match of any names. Otherwise, raise [Error::Match][Tabular::Error::Match].
next
For an [Option][Tabular::Kind::Option]-flavoured [Tablet][Tabular::Tablet] with #form?, yield the next
[Argument][Tabular::Kind::Argument]-flavoured [Tablet][Tabular::Tablet] to the specified &block.
Return the specified word and possible prefix, if delimited.