View previous topic :: View next topic |
Author |
Message |
dabooty Guru
Joined: 15 May 2003 Posts: 482 Location: Belgium
|
Posted: Thu Nov 27, 2003 9:39 pm Post subject: linux-2.6, page up to previous commands stopped working |
|
|
Hi,
since upgrading to a Z.6.x kernel i noticed something that's getting on my nerves.
typing a few letters in a bash prompt an pressing page up should go to the last command you typed starting with those letters, right?
well it no longer does, it seems to go at a random command somewhere _________________ registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Fri Nov 28, 2003 5:20 am Post subject: |
|
|
Bash has never behaved like that by default. If you type a few characters and hit CTRL-R, then yes, it starts to complete those previous commands. Otherwise, pageup doesn't do anything special at all.
Perhaps you had page-up generating CTRL-R at some stage? |
|
Back to top |
|
|
dabooty Guru
Joined: 15 May 2003 Posts: 482 Location: Belgium
|
Posted: Fri Nov 28, 2003 7:58 am Post subject: |
|
|
ctrl-R does something different. it shows reverse-i-search and then youre probably supposed to do something else to complete the command...? could you tell me what?
I don't get this, page up used to jump to the last command starting with the letters. I never read about this feature, i just assumed it appeared in a later version of the shell (that was a lot newer than on my debian box) but it was pretty darn handy _________________ registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Fri Nov 28, 2003 9:45 am Post subject: |
|
|
It would be handy - if you figure it out, please post here |
|
Back to top |
|
|
dabooty Guru
Joined: 15 May 2003 Posts: 482 Location: Belgium
|
Posted: Fri Nov 28, 2003 11:42 am Post subject: |
|
|
http://www.cyberspace.org/~alexs/stuff/linux.html
Quote: | history-search-{foward,backward}
This is like tab-completion (you know about that right? but using your command history rather than file names for the completion. I have it bound to page up, so for example if i'd done gcc foo.c recently, then type gcc (pgup) it will complete to gcc foo.c.
Add the following to your /etc/inputrc or ~/.inputrc -
"\e[6~": history-search-forward
"\e[5~": history-search-backward
This will bind them to pgup and pgdn. |
I'll try this when i get home after work, i'll get back you you if it worked.
But i'm still as baffled as before. First i didn't know why my gentoo box showed this behavior, but i liked it. Now (just as surprisingly) it stopped working. I'm damn sure i never put those lines in .inputrc before. _________________ registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand |
|
Back to top |
|
|
echo6 Guru
Joined: 04 Jan 2003 Posts: 587
|
Posted: Fri Nov 28, 2003 1:02 pm Post subject: |
|
|
The entries are already there in /etc/inputrc, they are commented out. |
|
Back to top |
|
|
dabooty Guru
Joined: 15 May 2003 Posts: 482 Location: Belgium
|
Posted: Fri Nov 28, 2003 6:48 pm Post subject: |
|
|
Quote: | The entries are already there in /etc/inputrc, they are commented out. |
huh, not in my inpurc:
Code: | "\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word |
in my inputrc it's linked to beginning and end of history
changing them to what i previously posted as a possible solution just makes sure pgup and pagedown do nothing, sticking them in my ~/.inputrc doesn't change the behaviour defined in /etc/inputrc.
any suggestions? i really liked this pageup thing _________________ registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand |
|
Back to top |
|
|
wonderbread n00b
Joined: 04 Nov 2002 Posts: 28
|
Posted: Fri Nov 28, 2003 9:33 pm Post subject: |
|
|
I'm running 2.6-test10, bash 2.05b-r5, and pageup/pagedn works as you originally described. |
|
Back to top |
|
|
Lion Apprentice
Joined: 23 Jun 2002 Posts: 207
|
Posted: Sat Nov 29, 2003 7:58 pm Post subject: |
|
|
/etc/inputrc is part of sys-apps/baselayout.
Apparently, the Gentoo-developers decided at one time that history-browsing for pageup/down was a good idea, whereas now, they have changed it to beginning/end of history.
When you perform an etc-update, the file will be updated to the new behaviour (which I, just as the original poster, don't like), if you are not really careful.
All this has nothing to do with kernel versions. It might have seemed that way, because a new kernel will mean a reboot, which will make sure that your new settings are read in. |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Sat Nov 29, 2003 9:12 pm Post subject: |
|
|
This is presumably with xterm? Because with aterm, all I get is '~'. |
|
Back to top |
|
|
dabooty Guru
Joined: 15 May 2003 Posts: 482 Location: Belgium
|
Posted: Sun Nov 30, 2003 12:21 pm Post subject: |
|
|
Quote: | whereas now, they have changed it to beginning/end of history. |
changes like this are pretty crappy IMO _________________ registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Sun Nov 30, 2003 6:46 pm Post subject: |
|
|
Change it back. You have the source. You can do anything you want. |
|
Back to top |
|
|
|