Changeset 37497 in project


Ignore:
Timestamp:
03/31/19 09:12:37 (18 months ago)
Author:
wasamasa
Message:

breadline: Release 0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/breadline

    r37445 r37497  
    3333
    3434==== History
     35
     36<procedure>(history-length)</procedure>
     37
     38Returns the current history length.
    3539
    3640<parameter>(history-file)</parameter>
     
    8488completion.
    8589
     90==== Text Manipulation
     91
     92<procedure>(insert-text STRING)</procedure>
     93
     94Insert {{STRING}} into the line at the current cursor position.
     95Returns the number of characters inserted.
     96
     97<procedure>(delete-text START END)</procedure>
     98
     99Delete the text between {{START}} and {{END}} in the current line.
     100Returns the number of characters deleted.
     101
     102<procedure>(stuff-char CHAR)</procedure>
     103
     104Insert {{CHAR}} into the Readline input stream. It will be "read"
     105before Readline attempts to read characters from the terminal. Up to
     106512 characters may be pushed back. Returns {{1}} if the character was
     107successfully inserted; {{0}} otherwise.
     108
     109<procedure>(redisplay)</procedure>
     110
     111Change what's displayed on the screen to reflect the current contents
     112of Readline's buffer.
     113
     114==== Event hooks
     115
     116<procedure>(event-hook-set! PROCEDURE)</procedure>
     117
     118Registers a hook that will be called periodically when Readline is
     119waiting for terminal input. By default, this will be called at most
     120ten times a second if there is no keyboard input. The argument should
     121be a thunk. Its return value is ignored.
     122
     123Only one event hook may be registered at a time. A
     124previously-registered hook may be disabled by passing {{#f}}.
     125
     126<procedure>(pre-input-hook-set! PROCEDURE)</procedure>
     127
     128Registers a hook that will be called every time the first input prompt
     129has been printed, just before {{readline}} starts reading input
     130characters. The argument should be a thunk. Its return value is
     131ignored.
     132
     133Only one pre-input hook may be registered at a time. A
     134previously-registered hook may be disabled by passing {{#f}}.
     135
    86136==== Customization
    87137
     
    117167
    118168Returns an input port using GNU Readline for line editing and history
    119 management.  {{PROMPT}} defaults to the value of calling
    120 {{(repl-prompt)}}.
     169management.  {{PROMPT}} may be a string or a thunk returning a string
     170and defaults to {{(repl-prompt)}}.
    121171
    122172=== Examples
    123173
    124174<enscript highlight="scheme">
    125 (import breadline)
     175(use readline)
    126176
    127177(let loop ()
     
    138188Further examples for usage in {{csi}} and writing your own completer
    139189can be found
    140 [[https://github.com/wasamasa/breadline/tree/master/examples|in the repository]].
     190[[https://github.com/wasamasa/readline/tree/master/examples|in the repository]].
    141191
    142192=== License
     
    159209=== Version history
    160210
     211==== 0.3
     212
     213* Support thunks for make-readline-port and its prompt (thanks Macro Maggi!)
     214* Expose history-length procedure (thanks Macro Maggi!)
     215
    161216==== 0.2
    162217
Note: See TracChangeset for help on using the changeset viewer.