Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reverse i-search

5 views
Skip to first unread message

Jean-Francois Lamy

unread,
Jul 2, 1989, 9:53:58 PM7/2/89
to
If you have something typed on the line and hit ^R, you get the
reverse i-search prompt with the current contents, which would lead you
to believe that the search had found the previous line with what you
have typed so far. but no, the search won't start until you type
another character, and what you have typed so far is ignored.

The behaviour where something on the line followed by ^R actually
searches back immediately is similar to that of tcsh; the one where
the prompt would be cleared would be ok, but I suspect that most often,
if you have something typed when you hit ^R it is because you had
that command in mind and you've just realized that you had issued
a similar one before..., so clearing the prompt would usually mean
more typing.

Paul Placeway

unread,
Jul 3, 1989, 10:40:29 AM7/3/89
to
In article <89Jul2.2154...@neat.ai.toronto.edu> la...@ai.utoronto.ca (Jean-Francois Lamy) writes:

From: la...@ai.utoronto.ca (Jean-Francois Lamy)

For this, I think bash does ^R much better than tcsh does.
reverse-i-search is what ^R does in Emacs, and bash has the
functionality exactly right.

All you need to do is learn to type ^R before the string to search
for... 8-)

(I don't mean to flame Jean-Francois Lamy over and over, I just want
to see the user interface of bash be better than (rather than just
like) that of tcsh...)

-- Paul Placeway

Jean-Francois Lamy

unread,
Jul 3, 1989, 12:41:18 PM7/3/89
to
I think I should just type my postings in English (re-reading them left me
with no hope of pleading I had been misunderstood -- what gibberish :-).

a) I think that ^W,^@ and ^Y should be as in tcsh, i.e. that emacs users
would like that better than the traditional unix bindings. It's the
"I have only one brain" idea.

b) While I like the idea of a true ^R better than tcsh's approximation, I
think that bash'es behaviour of leaving the current line in the prompt and
ignoring it is counter-intuitive. When a reverse i-search in emacs shows
"foo" in the prompt, and you type "bar", you expect it to search for
"foobar", not "bar". So one of two things: either make bash search for
"foo" when you type ^R after typing "foo" (which resembles) tcsh, or
clear the prompt. In any case, make the prompt match what is being
searched for.

Jean-Francois Lamy la...@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy
AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4

Jacob Gore

unread,
Jul 4, 1989, 2:12:24 PM7/4/89
to
/ gnu.bash.bug / la...@ai.utoronto.ca (Jean-Francois Lamy) / Jul 3, 1989 /
...When a reverse i-search in emacs shows

"foo" in the prompt, and you type "bar", you expect it to search for
"foobar", not "bar". So one of two things: either make bash search for
"foo" when you type ^R after typing "foo" (which resembles) tcsh, or
clear the prompt. In any case, make the prompt match what is being
searched for.
----------

But it's not the prompt that's not being cleared, it's the text. Emacs
shows you the text being found in a window, and the string being searched
for in the minibuffer. Bash does not show a minibuffer, all you see is the
text being found. When you start a reverse i-search, the text cursor stays
at the same position, both in emacs and in bash.

I don't think the last text line should be cleared when you enter reverse
i-search. I like being able to use reverse i-search to move around in the
current line, especially if it's a long one. You seem to assume that it is
always used to find a DIFFERENT line.

--
Jacob Gore Ja...@Gore.Com {nucsrl,boulder}!gore!jacob

0 new messages