struct
TermBuf::ResponsePattern
- TermBuf::ResponsePattern
- Struct
- Value
- Object
Overview
A reply the application is expecting from the terminal, described by what it starts and ends with.
This exists because a reply and a keystroke are not distinguishable by
looking at them. An arrow key sends ESC [ A; so could a terminal. The
only thing that separates them is that the application asked for one and
not the other, which is what registering a pattern records.
Defined in:
termbuf/terminal/responses.crConstructors
Instance Method Summary
-
#matches?(sequence : String) : Bool
Whether sequence has this pattern's prefix and terminator.
-
#prefix : String
What the reply begins with, such as
"\e[?"for a mode report. -
#terminator : String
What the reply ends with, such as
"$y". -
#to_s(io : IO) : Nil
Same as
#inspect(io).