Readline/command history w/ interactive prompt

Michael Hudson mwh at python.net
Thu Apr 18 07:40:50 EDT 2002


Andy Gimblett <gimbo at ftech.net> writes:

> On Thu, Apr 18, 2002 at 10:04:18AM +0000, Michael Hudson wrote:
> > Andy Gimblett <gimbo at ftech.net> writes:
> > 
> > > On Wed, Apr 17, 2002 at 05:51:17PM +0000, Mark Jackson wrote:
> > > 
> > > > Try hitting control-r and typing a short string that last appeared
> > > > in the line desired ("my" or even "m" would work in this case).
> > > 
> > > _Nice_!  Thanks for that.  One question though: where's this feature
> > > documented?  :-)
> > 
> > "man bash", "man readline".  Not too hard...
> 
> Hmmm...  Personally, I can't imagine making the conceptual leap from
> "where's the python interpreter documentation" to "I know, I'll look
> at the bash man page" without prompting.

Well, it was you who mentioned bash in your original post.  I'm pretty
sure readline was developed as part of bash before being released on
it's own, but if you're not aware of the history (or I'm wrong), then
this isn't obvious.

> man readline, I admit, was more obvious.

Yup.

> Thanks for the pointers,

Hope they help!

I think I only use about 20% of what's possible with readline in bash;
but as my Mac came with only tcsh & zsh learning more readline now is
probably counter-productive.

Cheers,
M.

-- 
  It's a measure of how much I love Python that I moved to VA, where
  if things don't work out Guido will buy a plantation and put us to
  work harvesting peanuts instead.     -- Tim Peters, comp.lang.python



More information about the Python-list mailing list