Autocomplete & History
As you type a command, Cogno suggests how to finish it — from what you ran before and from built-in knowledge of more than 1000 command-line tools.
The suggestions open on their own while you type. To open them yourself, press
Ctrl+Space (Control+Space on macOS).
Use it
Section titled “Use it”| Key | Effect |
|---|---|
↓ / ↑ | Select the next or previous suggestion |
Enter | Accept the selected suggestion |
Tab | Switch between all, context and history suggestions |
Escape | Close |
Nothing is selected at first. If you press Enter without selecting, the list closes and
your command runs exactly as typed — autocomplete never changes a command behind your back.
The line under the list describes the selected suggestion and shows the active filter.
The list stays out of the way: it hides while a command is running, and after you press an arrow key on the prompt it stays hidden until you type again.
Where suggestions come from
Section titled “Where suggestions come from”| Source | Suggests |
|---|---|
| Your commands | Commands from your history that match the input. Each one shows whether you ran it in this directory or elsewhere. Accepting it replaces the whole line. |
| Your patterns | Recurring command patterns found in your history |
| Your directories | Directories you visited before, while you type a cd command |
| CLI specs | Subcommands and options of 1000+ tools, plus live values such as file paths, git branches and npm scripts |
The three best history matches come first, then the spec suggestions, then the rest of your history. Duplicates are merged.
Filter
Section titled “Filter”Tab switches what the list shows. Your choice is remembered.
| Filter | Shows |
|---|---|
| All | history and specs combined |
| Context | only spec suggestions |
| History | only your history |
What gets into the history
Section titled “What gets into the history”Cogno keeps its own command history, separate from your shell’s. Only recorded commands can be suggested.
Cogno never records:
- commands the shell could not find — those are typos
cdcommands — directories are tracked separately- empty commands,
:,trueandfalse
Keep failed commands out
Section titled “Keep failed commands out”By default a command is recorded whatever it exits with. To keep only commands that worked, list the allowed exit codes:
terminal.history.allowed_return_codes = [0]terminal.history.allowed_return_codes_by_command.grep = [0, 1]The second line makes an exception for one command: grep exits with 1 when it finds
nothing, which is not a failure. The command is matched by its first word.
More history options
Section titled “More history options”terminal.history.max_entries = 5000terminal.history.ignore_commands_with_leading_space = trueterminal.history.import_shell_history = truemax_entriescaps the history; the default isunlimited.ignore_commands_with_leading_spaceskips commands typed with a leading space, asHISTCONTROL=ignorespacedoes in Bash.import_shell_historyfills an empty Cogno history from your shell’s history file on first launch.
Settings
Section titled “Settings”terminal.history.*— everything about the recorded historyautocomplete.provider.timeout_ms— how long Cogno waits for live values such as git branches
Both actions can be rebound: trigger_autocomplete and cycle_tab, see
Keybindings.