Searching

Press Ctrl Alt G at your prompt (on a Mac, Ctrl Option G, see Troubleshooting) to open the search list right under it. Anything already typed on the line becomes the search, so you can type undo my last commit first and then press Ctrl Alt G. Typing loxx and pressing Enter opens the same list.

Keys

KeyWhat it does
TypeSearch. Exact matches show at once, matches by meaning a moment later.
↑ ↓Move through the list.
TabSwitch the filter (see below). Shift+Tab goes back.
EnterPut the command in your prompt, ready to edit or run.
Esc or Ctrl+CClose without choosing.

With an empty search, the list shows your most recent commands.

Reading a result

Each line shows the command, then the folder it ran in, when it last ran, how many times it ran (14×), and whether it worked: ✓ for success, ✗ for a failure. Commands loaded from your old history say “imported”. A command that spans several lines is shown on one line, with ↵ marking the line breaks.

Filters

Tab cycles through:

FilterShows
allEverything.
this dirCommands run in this folder. Inside a git repository: anywhere in the same repository.
this sessionCommands run in this terminal window or tab.
failedCommands whose last run failed.

Suggested commands

With the “all” filter, the list also suggests the closest commands for what you want to do, even if you have never run them, marked suggested, but only for programs installed on your computer:

Choosing a suggestion puts it in your prompt with the cursor on the first word to replace, here remote_name. Your own commands that contain the words you typed come first; after them, your commands and suggestions take turns.

Keyword and meaning

Every search runs two ways at once and merges the results:

Search by meaning always shows the closest matches, even when none of them is a good match.

From scripts and other tools

loxx search prints matches instead of opening the list:

loxx search --limit 3 compress a folder
tar -czvf backup.tar.gz ~/Documents
    ~ · 2 weeks ago · exit 0 · 1 run

Running the program directly as ~/.local/bin/loxx (without the shell hook) opens the list and prints the chosen command, so you can use it in your own scripts.