Hi, so as the new maintainer for
the readline egg I wanted to reach out to the community and see
if anybody had any hacks that they'd like to see included in the
egg or if any old maintainers have uncommitted code? |
Also if you'd like to see a feature get implemented/added to the
egg, please let me know.
Here's a list of the changes that will most likely be appearing
(most of them are ready to go and will be available in the egg's
trunk as soon as I get my repo creds working) in the next
release. If y'all would please read the changes and provide
whatever feedback you feel like giving, I'd really appreciate
Version 2.0 Changes
- module's exports use slightly different names: breaking
compatibility with code relying on the previous release of the
- solution: legacy bindings?
- better paren-bouncing: previous version did it from scratch;
version 2.0 uses readline's built-in parenthesis bouncing
- Works with brackets (i.e. [ ] ) too.
- A bunch of new functions:
- (add-history STRING)
- does what it sounds like. Adds a
string to current history-list.
- (add-history-time STRING)
- changes the timestamp associated
with the most recent entry in history-list.
- (history-entry-time OFFSET)
- returns the timestamp (a c-string)
for the entry at the specified offset in history-list
- if there isn't a timestamp for the
entry at offset or there isn't an entry there at all,
the function returns #f.
- returns the line (a c-string) for
the current entry in history-list.
- returns the timestamp for the
current entry in history-list.
- (history-goto-entry OFFSET #!optional
- returns a list consisting of '(line:
STRING index: INTEGER)
- if #t or an exp evaluating to #t is
passed as RELATIVE, then OFFSET is relative to the current
entry in history list.
- (search-history STRING DIRECTION)
- returns a list consisting of '(offset:
OFFSET match: STRING index: POSITION) on match and #f on
- if direction is 0+ then it searches
through subsequent entries
- if direction is <0 then it
searches through previous entries
- (search-history-backward STRING)
- binds to (search-history STRING -1)
- (search-history-forward STRING)
- binds to (search-history STRING 0)
- returns the length of the
- returns the each history-list entry's
`line' field as a list split on the newline.
- (history-position #!optional POSITION)
- returns the current position in
- if POSITION is supplied, then it sets
the current position in history-list.
Things I'd like to add sometime in the next release or two
- paren highlighting. The matching paren/brace for the
currently selected one gets highlighted. (Cool, Neato! :D)
- if a paren/brace has no matching paren/brace, then it gets
highlighted a different color.
Thank you for your feedback and merry Christmas!