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.
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.
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.
e.g.
Command completition:
I want to edit my crontab. Typing cront
and hitting TAB then I will see my command complete: crontab
.
File/Directory completition:
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: /home/user/
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.
The 2588 possibilities
output, means the total amount of commands/files/directories available to type.
That will happen when hitting space key (invisible) and then TAB key twice (bash completion). The 2588 possibilities to display are likely the files/directories on your current working directory when hitting the space + bash completion key combination.
complete -E -c
first.
Commented
Dec 4, 2014 at 22:53
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)
By pressing Esc key thrice, will display this message.
Display all 2588 possibilities?
on Windows10 using git bash
Commented
Jan 30, 2017 at 13:00
According to https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html
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.