Readline
Line editing, history, and tab completion.
class ref Readline is ANSINotify ref
Implements
- ANSINotify ref
Constructors
create
Create a readline handler to be passed to stdin. It begins blocked. Set an initial prompt on the ANSITerm to begin processing.
new iso create( notify: ReadlineNotify iso, out: OutStream tag, path: (FilePath val | None val) = reference, maxlen: USize val = 0) : Readline iso^
Parameters
- notify: ReadlineNotify iso
- out: OutStream tag
- path: (FilePath val | None val) = reference
- maxlen: USize val = 0
Returns
- Readline iso^
Public Functions
apply
Receives input.
fun ref apply( term: ANSITerm ref, input: U8 val) : None val
Parameters
Returns
- None val
prompt
Set a new prompt, unblock, and handle the pending queue.
fun ref prompt( term: ANSITerm ref, value: String val) : None val
Parameters
Returns
- None val
closed
No more input is available.
fun ref closed() : None val
Returns
- None val
up
Previous line.
fun ref up( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
down
Next line.
fun ref down( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
left
Move left.
fun ref left( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
right
Move right.
fun ref right( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
home
Beginning of the line.
fun ref home( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
end_key
End of the line.
fun ref end_key( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
delete
Forward delete.
fun ref delete( ctrl: Bool val = false, alt: Bool val = false, shift: Bool val = false) : None val
Parameters
Returns
- None val
insert
fun ref insert( ctrl: Bool val, alt: Bool val, shift: Bool val) : None val
Parameters
Returns
- None val
page_up
fun ref page_up( ctrl: Bool val, alt: Bool val, shift: Bool val) : None val
Parameters
Returns
- None val
page_down
fun ref page_down( ctrl: Bool val, alt: Bool val, shift: Bool val) : None val
Parameters
Returns
- None val
fn_key
fun ref fn_key( i: U8 val, ctrl: Bool val, alt: Bool val, shift: Bool val) : None val
Parameters
Returns
- None val
size
fun ref size( rows: U16 val, cols: U16 val) : None val
Parameters
Returns
- None val
© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/term-Readline