[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] readline egg v2.0 feedback

From: Alexej Magura
Subject: Re: [Chicken-users] readline egg v2.0 feedback
Date: Mon, 02 Feb 2015 18:01:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Just pushed 3.0 out the door.  Please let me know if it isn't regnoized as the latest version and I'll bump it up to 3.1.

And let me know if yall come across any bugs.

It introduces the following toplevel commands:
  • ,rl-!!
    • Similar to Bash's !!, it evaluates the previous line.
  • ,rl-clh
    • Clears the history list for the current session
  • ,rl-savhist
    • Enables/disables saving history for the current session on exit
  • ,rl-rec
    • Enables/disables recording history for the current session
  • ,rl-rd
    • Reads a file's contents into the history list for the current session
  • ,rl-vi
    • sets the current editing mode to Vi emulation
  • ,rl-emacs
    • sets the current editing mode to Emacs emulation (the One True Editing-Mode) :P

The following functions have been added:

  • last-history-line
    • Returns the previous line in history as either a string or as-is
  • eval-last-history-line
    • The function behind ,rl-!!
  • variables
    • dumps GNU Readline's variable state, such as what editing mode it is in and etc.

Most of the functions added by v2.0 have been removed in 3.0; this, unfortunately, includes the history searching functions.  However, the history searching functions will be added back again in the next (proper) release, which should be 3.1.

On 01/27/2015 11:10 AM, Evan Hanson wrote:
Hi Alexej,

My tuppence:

On 2015-01-27  4:01, Alexej Magura wrote:
I don't think I'll use the toplevel-command stuff after all: I can't promise
that the toplevel symbols readline exports won't get overwritten, and I'm
not entirely sure readline has any business providing private toplevel
symbols that are only applicable to it. It might confuse less-experienced
users*, for one, and for another there's the already mentioned possibility
of symbol collision, unless somebody more knowledge on this subject can
prove otherwise.
It's your call of course, but I'd urge you not to let this stop you if
you'd otherwise like to provide this feature. If all commands are
prefixed by "rl", for example, the ease of use would outweight any risk
of conflicts, IMO. After all, extensions are expected to provide
commands; that's part of what the feature's there for. chicken-doc uses
it to great effect, for example.

Perhaps you could address the concern that users will mistake
readline-provided commands for builtins by adding a note that they come
from the readline egg to the commands' help strings?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]