Welcome to the new Linux Foundation Forum!

Display all 2516 possibilities?

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???

Comments

  • mfillpotmfillpot Posts: 2,180
    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.
  • JanedJaned Posts: 8
    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.
  • mfillpotmfillpot Posts: 2,180
    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.
  • (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?
  • JanedJaned Posts: 8
    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?
  • JanedJaned Posts: 8
    saqman2060 wrote:
    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?
    The program run the console has only one process and when exits returns to the console and nothing else until any time afterward I decide to run another program from that same console, five seconds later or five minutes later, the 2516 possibilities prompt then pops up.
  • Of course, this might not be of any help whatsoever, have you tried to run this command:

    clear

    I know whenever I was experimenting with building a Linux OS from source code (never do this; Bad Brandon, bad!), I ran into a similar error that didn't necessarily have to do with the escape key, per say, but my console would bring up garbage like this sometimes. You could also try hitting Ctrl-C a few times when this occurs or if that doesn't work, logout and then log back in and you should be good to go.
  • asedtasedt Posts: 96
    You can always disable completion, but thats not funny.

    Did you Google: "Display all * possibilities? (y or n)" you will find some info about this.

    Check this out:
    http://superuser.com/questions/37148/how-to-disable-double-tab-to-show-available-commands-in-linux-console

    Maybe you can just disable completion with the ESC key or completion on empty strings. I will see if I can find anything.
Sign In or Register to comment.