So, I was moving my laptop around (and I have the bad habit of setting things on the keyboard...) and I woke up to discover this:
$ Display all 2588 possibilities? (y or n)
What command would display something like this?
I'm using Bash.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Hitting TAB key helps you to auto complete either a command or a file/directory (as long as it is executable) you want to use, depending on what you are requesting.
Double hitting the TAB key helps you displaying the available stuff you could use for next.
I want to edit my crontab. Typing
cront and hitting TAB then I will see my command complete:
I want to backup my crontab.
crontab -l >> Type some words of the destination
/ho TAB then I will see:
/home/, type next
us TAB then I will see:
Now, when you double hit TAB key without typing something, then the prompt expects something, so it will want to help you displaying all the possibilities. With the prompt empty, it's expecting a command or a file/directory so it will want to display all the commands available for you & all the files/directories located in the directory where you are.
2588 possibilities output, means the total amount of commands/files/directories available to type.
I use tab completion all the time to save on typing. Totally didn't think about it's use when I wasn't completing a command string.
"\t" gets a bell
" \t" gets a bell
" \t\t" gets a directory list
"\t\t" gets the Display all possibilities (and then if I hit "\t" after that on a new commandline, I'll get it again instead of a bell)
When word completion is attempted for an argument to a command for which a completion specification (a compspec) has been defined using the complete builtin (see Programmable Completion Builtins), the programmable completion facilities are invoked.