Thread View: gnu.bash.bug
4 messages
4 total messages
Started by Jean-Francois Lamy
Mon, 03 Jul 1989 01:53
reverse i-search
Author: Jean-Francois Lamy
Date: Mon, 03 Jul 1989 01:53
Date: Mon, 03 Jul 1989 01:53
13 lines
1028 bytes
1028 bytes
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.
Re: reverse i-search
Author: Paul Placeway
Date: Mon, 03 Jul 1989 14:40
Date: Mon, 03 Jul 1989 14:40
30 lines
1958 bytes
1958 bytes
In article <89Jul2.215402edt.10369@neat.ai.toronto.edu> lamy@ai.utoronto.ca (Jean-Francois Lamy) writes: From: lamy@ai.utoronto.ca (Jean-Francois Lamy) 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. 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
Re: reverse i-search
Author: Jean-Francois Lamy
Date: Mon, 03 Jul 1989 16:41
Date: Mon, 03 Jul 1989 16:41
18 lines
1436 bytes
1436 bytes
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 lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy
AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4
Re: reverse i-search
Author: Jacob Gore
Date: Tue, 04 Jul 1989 18:12
Date: Tue, 04 Jul 1989 18:12
22 lines
1520 bytes
1520 bytes
/ gnu.bash.bug / lamy@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 Jacob@Gore.Com {nucsrl,boulder}!gore!jacob
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads