macOS Terminal History Search

ctrl+r starts the search.

Repeatedly hit ctrl+r to cycle through the results.

Enter executes the current result.

right arrow will insert the current result into the current line.

$ history will display all executed commands.

$ history | grep 'git' will display all commands that contained git.

Leave a Comment