Command completion lets you type just part of a previous command and have the shell fill in the rest. As with filename completion, if no match is found, color highlighting as defined by the MATCHFAIL variable (default is bright red) will be used. Consecutive depressions cause the search to continue on back through the history list.
Ctrl-Enter
Find the previous command that started with the characters of the preceding word.
Ctrl-Shift-Enter
Find the previous command that contained the characters of the preceding word anywhere on the line.
Repeatedly pressing these keys cycles up through all the matching commands you’ve previously typed. Command completion uses the history mechanism to recall commands you’ve previously typed.
History recall
Command line editing
MATCHFAIL variable
Filename completion
Tutorial: History
Tutorial: Command line editing
Tutorial: Filename completion