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.
loxx ❯ undo last commit ▸ git reset --soft HEAD~1 ~/code/shop · 3 days ago · 2× ✓ git revert HEAD ~/code/api · 2 weeks ago ✓ git commit --amend ~/code/shop · 1 day ago · 6× ✓ git log --oneline -5 imported filter: all (Tab) · ↑↓ · Enter use · Esc cancel
Keys
| Key | What it does |
|---|---|
| Type | Search. Exact matches show at once, matches by meaning a moment later. |
| ↑ ↓ | Move through the list. |
| Tab | Switch the filter (see below). Shift+Tab goes back. |
| Enter | Put the command in your prompt, ready to edit or run. |
| Esc or Ctrl+C | Close 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:
| Filter | Shows |
|---|---|
| all | Everything. |
| this dir | Commands run in this folder. Inside a git repository: anywhere in the same repository. |
| this session | Commands run in this terminal window or tab. |
| failed | Commands 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:
loxx ❯ delete a branch on the remote ▸ git branch ~/code/shop · 2 days ago git push remote_name -d remote_branch_name suggested · Delete a remote branch
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:
- Keyword: commands containing all the words you typed. Good for names you remember:
kubectl port-forward. - Meaning: commands whose purpose is closest to what you typed, even with no words in common. “expose my service locally” finds
kubectl port-forwardtoo.
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 runRunning 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.