Linux.com

Home Linux Community Forums Software Command Line Display all 2516 possibilities?

Display all 2516 possibilities?

Link to this post 11 Dec 10

When at the Konsole I often run programs that accept the Esc key to exit, but then it often buffers an extra one, then when I go use the up arrow to select previous commands, it gives me the message: "Display all 2516 possibilities? (y or n)" This is an difficult thing search for google. Nobody has been able tell me how to disable it for years and its getting to be one of those very irritating things about the linux. I think I'm starting to wear down the n key and I now am begging, can anyone to tell me how to disable it???

Link to this post 12 Dec 10

I have not seen history act like that on any system I run, generally when I use the up arrow it just scrolls through past commands.

I recommend checking out your /etc/profile and ~/.bash_profile configurations to see if something is causing that functionality. Checkout http://www.justlinux.com/nhf/Shells/Configuring_the_Bash_Shell.html to learn how to configure your bash session and history options.

Link to this post 12 Dec 10

mfillpot wrote:

I have not seen history act like that on any system I run, generally when I use the up arrow it just scrolls through past commands.

I recommend checking out your /etc/profile and ~/.bash_profile configurations to see if something is causing that functionality. Checkout http://www.justlinux.com/nhf/Shells/Configuring_the_Bash_Shell.html to learn how to configure your bash session and history options.

Just hold down the Esc key for more than 2 seconds and it will happen. The same thing also happens in Fedora, Mandriva, Mint, Susu, and Ubuntu. I would think that someone in this forum could tell me how to disable it? For this sort of problem googling appears useless.

Link to this post 12 Dec 10

Thank you for the info, that is not part of the history program. What you are invoking in a listing of the current working directory and all commands that you can run from the command line.

In that case it sound like xmodmap has your arrow key mapped to the ESC keyslot, you can check the mapping by using "xmodmap -pke" and also use the program to key the correct key.

the showkey command can be used to determine the key number and the button can be bound correctly using xmodmap.

Link to this post 12 Dec 10

(When at the Konsole I often run programs that accept the Esc key to exit, but then it often buffers an extra one)

By this do you mean the console, executes another program prior to the program you "Esc" out of? If so, are you holding down the "Esc" key while the new program is buffered?

Link to this post 13 Dec 10

mfillpot wrote:


In that case it sound like xmodmap has your arrow key mapped to the ESC keyslot, you can check the mapping by using "xmodmap -pke" and also use the program to key the correct key.

xmodmap -pke shows:

keycode 9 = Escape
...
keycode 98 = Up

so its unlikely what's going on, because the program uses ncurses getch() for key input where KEY_UP is used to move something in the Y direction, KEY_RIGHT in the X direction, and so forth until a key not defined such as Esc is hit, then it exits the loop. (I know, I know, don't use the Esc key. But that habit is ingrained in my muscle-memory from other programs). What is interesting is if I hit the Esc key hard-and-fast there is no problem. Its only when I hit it in a normal fashion, say a quarter-second or longer, that the 2516 possibilities arise. I wonder if perhaps there some way to purge the key buffer since there doesn't seem to be a keycode for ESC available for the getch() function?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board