Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shortcut key to see possibilities of commands in bash?

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Today i accidently hit the shortcut key.
then it asked me to display all the possibilities , i did Y.

then it have shown me all the list of command.

Now i do not know which shortcut key i actually pressed.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11914
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you are talking about command line completion which is normally the tab key in bash.

Normally if you have typed part of a command or part of a filename and press tab, bash will complete the command or filename if it is unambiguous. If it is ambiguous then bash will only complete as much of the command or filename as it can to the point where it becomes ambiguous. Pressing tab a second time will then show you all the possible expansions that bash knows about.

If you press tab at a blank prompt then you have the potential of using every command bash knows of - far too ambiguous, so nothing will happen. Press tab a second time, and you should get a warning about how many potential commands are going to match - in my case bash asked me if I really wanted to "Display all 1816 possibilities? (y or n)"

This can be customized considerably, and can be a very useful tool when you get used to it.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you ..i was looking for double press tab only
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic