Shell history

Your shell already keeps a record of everything you run. Commando reads it live and folds it into the same fuzzy list as your cheats and project commands — so a command you ran last week is one search away.

Read live, never copied

Commando does not install a capture hook and does not keep its own copy of your history. Each time it runs, it reads your shell's history file directly. This means:

  • No preexec/precmd hook slowing down your prompt.
  • No second, drifting copy of your history to manage.
  • Nothing to migrate or back up — your shell already owns the file.

Which file is read

Commando looks for your history file in this order:

  1. $HISTFILE (whatever your shell has set)
  2. The active shell's standard path: ~/.zsh_history, ~/.bash_history, or $XDG_DATA_HOME/fish/fish_history
  3. The remaining standard paths as fallbacks

The first one that exists is used.

Searching history

Inside the TUI, history entries appear alongside everything else — just type to filter. From the command line, use the history subcommand:

commando history              # recent commands
commando history docker       # commands containing "docker"
commando history --limit 100 kubectl

The query is a case-insensitive substring match. Results print newest-first.

List limit vs. search

When you're not searching, the TUI caps how many history commands appear (default 10) so the list stays focused on curated cheats and project commands. As soon as you type a query, all matching history in the loaded window is shown. Tune this with history.list_limit in config.

Redaction

Commands that look like they contain secrets are hidden from the history list via a configurable, HISTIGNORE-style denylist. The defaults cover common cases:

history_ignore = [
  "*password*",
  "*passwd*",
  "*secret*",
  "*token*",
  "*apikey*",
  "*api_key*",
  "export *KEY*",
  "*credential*",
]

Matching rules:

  • Patterns are matched case-insensitively.
  • A pattern with no wildcard is a substring match.
  • Wildcards (* ? [ ]) use shell-glob semantics.

Add your own patterns in config.toml to hide anything project- or company-specific.

Redaction hides; it doesn't delete

The denylist stops secret-looking commands from appearing in Commando's list. It does not edit your shell history file. To keep secrets out of history entirely, use your shell's own HISTIGNORE/setopt HIST_IGNORE_SPACE features. And to keep secret values out of Commando's memory, set remember = "none".

Performance on large histories

Commando reads only the newest 8 MiB of the history file and retains up to 5,000 unique commands by default. This keeps startup predictable even when a shell history has grown for years. Tune either bound:

[history]
max_load = 10000
max_bytes = 16777216   # newest 16 MiB

Set either value to a negative number for unlimited behavior. A zero value keeps the default.

Next

  • Bookmarks

    Promote a hard-to-remember command into a saved, tagged entry.

  • Configuration

    Tune list limits, load caps, and the redaction denylist.

>_

Search the Commando documentation

Try “optional parameters”, “shell history”, or “bookmarks”.