You are not logged in.
Pages: 1
I once sat at a terminal which had a very smart auto-completion: Say I had the command history
man gcc
man gfortran
cd Dat_F/Exercise_2
tar -zxvf fortran2.tgz
rm fortran2.tgz
ls -l
nano /etc/pacman.conf
sudo nano /etc/pacman.conf
sudo pacman -Suy
and I wanted to use a tar command similar to the one on line 4. Usually I would use the up arrow a lot of times till I finally got to the tar command. But with the smart auto-completion, I simply had to type "t" and then use the up arrow - then it would only cycle though the events in the command history starting with a "t".
Does anyone know how to get this smart auto-completion?
Offline
If you are in bash, you can try pressing Control R to go into history search mode, You can also look into history identifiers with !.
Offline
If you are in bash, you can try pressing Control R to go into history search mode, You can also look into history identifiers with !.
Actually I have already looked at both these - but those are not what I'm looking for: I would like the auto-completion to be smart as explained above
Offline
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Here they say that I must write the two lines
"\e[a": history-search-backward ## shift+up-arrow
"\e[b": history-search-forward ## shift+down-arrow
in my .inputrc.
First of all, I don't have an .inputrc anywhere, so I simply tried creating one (at ~ of course).
But nothing seems to happen when I press shift+up-arrow or shift+down-arrow - with or without writing something before doing it..?
Last edited by bozack (2009-09-08 16:39:43)
Offline
I use this in my .inputrc. and it works fine
I think you have to source .inputrc so that it takes effect. Or restart your terminal
Offline
I use this in my .inputrc. and it works fine
I think you have to source .inputrc so that it takes effect. Or restart your terminal
Actually I just restarted the terminal (I couldn't remember what else to do) - but it didn't change anything
Offline
What shell you're using? IIRC, zsh doesn't read ~/.inputrc, so if this is the shell you're using, you have to find another way to config it.
(lambda ())
Offline
for zsh, ESC+p / ESC+n works out of the box : http://www.cs.elte.hu/zsh-manual/zsh_14.html
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
What shell you're using?
Sorry, I should have written that from the start: I use bash
Offline
Pages: 1