Autosuggestions
As you type, DropTerm finishes the line for you: when the most recent matching command from this tab's own history starts with what you have typed, the rest appears as dim ghost text after your cursor - fish's autosuggestions, computed entirely on your machine. Nothing is ever sent to the shell without an explicit accept.
Suggestions are a feature of rich input mode. The default mode, native, is the bare shell and shows nothing. The setup wizard offers to switch you to rich in one press; until you answer it, the default stays native (settings).
Two rules hold everywhere:
- Your history wins. When a history line and any other provider (paths, command names, the completions table, aliases, git) both match, history answers.
- Uncertainty means silence. You never get a wrong suggestion; the failure mode is always no suggestion.
The whole path from keystroke to ghost or menu:
Accepting a suggestion
Rightaccepts the whole suggestion.Alt+Rightaccepts one word, leading spaces included.Escapeclears it. It stays cleared until the line changes, then suggesting resumes.
The ghost is inert pixels until you accept it. Width is the one display quirk: a suggestion too wide for the columns left clips with a trailing … (fish's rule), and accepting still writes the full text. Below three free columns nothing draws, but the suggestion stays live.
When nothing is suggested
Silence is deliberate. You get no ghost:
- while a child program holds the foreground (
vim,htop, aread -pprompt); - while you are scrolled back into scrollback;
- while text stands after your cursor, a shell-drawn autosuggestion included;
- on a multi-line or right-side prompt when shell integration is off or unsupported;
- for the rest of a session after you type
sshyourself (the ssh client owns the line from then on).
From your history
History is this tab's own, scraped from the screen as commands finish. At spawn, a fresh tab also seeds once from your shell's history file:
~/.bash_history(bash)~/.zsh_history(zsh)~/.local/share/fish/fish_history(fish)- On Windows, PowerShell's PSReadLine history under
%APPDATA%:Microsoft\PowerShell\PSReadLine\ConsoleHost_history.txtforpwsh,Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txtfor Windows PowerShell.
The file is only ever read, once, at spawn. DropTerm never writes to it, and nothing leaves your machine. In a WSL tab, the tab seeds from the distribution's own history through the \\wsl$ path. A distribution too slow to answer seeds nothing, and nothing waits. What you run lands on top as newer, so your tab's own commands outrank the seeded file.
A tab spawned with suggestions off (input_ghost) never touches the file. Turn it on later and seeding happens at the next respawn.
Toggle with input_ghost (default true, Settings' Auto complete page). A flip applies live: a showing suggestion disappears at once, and after re-enabling, suggestions return at your next typed prefix.
Shell integration
With shell integration - on by default, with shell_integration as the kill switch - the supported shells (bash, zsh, fish, and PowerShell on Windows) tell DropTerm where each prompt starts. This is what makes suggestions work on themed, multi-line, or otherwise unusual prompts, and a prompt that changes on its own (a cd reflected in the prompt, a sourced venv) is picked up as soon as it redraws, not at the next command.
Without it (another shell, ssh, the kill switch), DropTerm falls back to reading the screen. Plain prompts still work; exotic ones can defeat the read and stay silent. A tab spawned as ssh, for example from a profile, still suggests: its scraped history includes the remote machine's commands, read off the screen.
The delay
autosuggestions_delay_ms (default 0, fish parity) holds a qualifying suggestion back until your typing has been steady for that many milliseconds. At 0 the ghost updates as you type; 200-300 ms gives you one ghost at the pause instead of churn. The delay changes when a suggestion appears, never which one: the same candidates win either way.
Any keystroke restarts the wait and dismisses a showing ghost instantly. Once a ghost shows, Right and Alt+Right work unchanged.
Settings' Auto complete page takes the number and applies it live.
Paths
Beyond history, a path-shaped token completes from the filesystem: ~/sr ghosts its completion when one is certain, ./do ghosts cs/, /usr/bi ghosts n/. Same ghost, same keys as history. History still outranks the directory listing.
- Path-shaped means rooted at
~,.,.., or/, or containing a/anywhere (sr/xcounts). A bare word likesrcnever triggers it; that is history's (and the command table's) territory. - A unique match completes fully, directories suffixed
/. One completion, never a menu. - An ambiguous match completes only what every candidate shares: with both
srcandsrvpresent,~/sghostsr, and~/srghosts nothing. - Dotfiles complete only when your typed component starts with the dot, matching the shell's own convention.
- Names the shell would mangle are escaped:
my file.txtsuggestsmy\ file.txt, a printable name past that is single-quoted (cafésuggests'café'), and a name neither form can save - a newline, a control character, an embedded quote - suggests nothing. - Paths are local-machine knowledge, so they run only on a tab whose spawned program is a shell (
bash,zsh,fish,sh,dash,ksh,csh,tcsh). On a tab spawned as ssh, the readable working directory is the wrong machine's, so paths stay silent; history keeps suggesting. Every provider below rides this same gate. - The working directory is the tab's live one, so completions follow a
cdwithout restarting the tab. - Toggle with
autosuggestions_paths_enabled(defaulttrue). A flip applies at the next typed prefix;falserestores history-only suggestions.
Command names
On a fresh tab with an empty history, gi still finishes itself, to git or whatever the shortest local match is. The first word on the line completes from the executables on the tab's $PATH, snapshotted at spawn and never rescanned. Same ghost, same keys.
- Command position only. Once an argument is open (
git che), the catalog is silent; paths and the completions table take over. - The shortest match wins, ties broken alphabetically:
gisuggestsgit, notgiftopnm. The match must extend what you typed: withgitinstalled, typinggitsuggests nothing. - Below two typed characters the catalog stays silent. That one is deliberate: at a single character, shortest-match over every executable on
$PATHis a guess. History is untouched - on a tab you have used,gstill completes from your own past. - History outranks the catalog, always. Run
git statusonce andgighostst statusfrom then on. - The catalog lists the spawn-time
$PATH, so it rides the same shell gate as paths: silent on a tab spawned as ssh or any other non-shell program. A profile's env-mapPATHis the PATH it completes from. - Names the shell would mangle are escaped or quoted exactly like paths.
- Toggle with
autosuggestions_commands_enabled(defaulttrue), with the same flip semantics as paths.
Subcommands and flags
After the command word, a built-in table completes subcommands and flags for common commands - git, docker, gh, rustc, apt, sudo, DropTerm's own CLI, among others:
git che ghosts ckout, git commit --am ghosts end, docker compose u ghosts p, rustc --emit=a ghosts sm, sudo apt ins ghosts tall, and dropterm new-tab --cw ghosts d. Same ghost, same keys, and history outranks every entry: a command you have run before wins over the table.
An installed data file, the extended tier, adds more commands beside the built-ins while Extended completions is on. It ships with the installer (sudo just install) and is on by default. Your own completions.toml beside the config replaces any command it re-declares, from either tier.
DropTerm never runs --help, never reads man pages, and nothing executes while you type; the data files themselves cannot carry scripts.
- Flags are per subcommand:
git commit --amcompletes--amendfrom commit's own list, not the command's whole table. A flag marked persistent rides into every subcommand below it - git's flat flag table rides that way entirely, sogit checkout --drghosts the same flag asgit --dr. - A flag's argument takes the next word: after
--emit(=or a space), the next word completes from that flag's suggestions (rustc --emit=aghostssm; accepting writes the bare value, never an=). A flag whose argument has no suggestions is silent there (mkdir -mghosts nothing). A file or folder argument hands the seat to paths:git add src/completes from the directory listing, andgit add a b --returns to add's flags. - Subcommands nest:
docker compose ughostsp;gh pr creghostsate. A command argument restarts the walk on that command's tree:sudo apt inscompletes from apt. - Unknown flags are skipped, never fatal:
git --whatever ststill ghostsash. - Short flags are understood but never offered: their arguments consume, so
mkdir -m 755reaches the folder seat, but DropTerm never completes a short flag. Collisions between short flags are guesswork, and a wrong single-choice ghost is worse than silence. - A bare
--ghosts nothing; one character past it (--a), flag prefixes discriminate again. The subcommand seat stays strong even at one character:git aghostsdd. - Match rules are the command catalog's: strict prefix, must extend, shortest wins, alphabetical ties. A flag already on the line never completes again, and a flag that excludes another (
exclusive_onin the file) steps aside once its excluder is typed. - Commands outside the table stay silent; the provider never guesses.
python3 whaghosts nothing. - Extended tier toggle:
autosuggestions_completions_extended(defaulttrue- the toggle is the kill switch, not an opt-in). A missing, unreadable, or invalid file answers the built-ins whatever the key says. The built-in tier is always present, wherever the shell gate holds.
Aliases
gc --dr ghosts git's --dry-run when gc is an alias you declared: the completions table is consulted for the command the alias runs. DropTerm never reads your shell's rc files, never runs alias in the session, and never guesses an alias it was not told about.
Declare aliases in autosuggestions_aliases (default empty - no alias re-targets anything), one expansion per alias, in the config file:
// config.ron
(
autosuggestions_aliases: {
"gc": "git checkout",
},
)
- The alias is re-targeted, not rewritten:
gc --drghostsy-runandgc cheghostsckout, exactly asgit --drandgit chewould. Accepting writes only the suggestion's suffix. Your typedgcstaysgc, and DropTerm never sends the expansion unless you accepted ghost text that spelled it. - History outranks the map: after one real
gc checkout main,gc cheghostsckout mainfrom the tab's own past. - Chains resolve: an alias may map to another alias, to a depth of three. A cycle (
a = "b"withb = "a") ends in silence, never a guess. - The map is local-machine knowledge and rides the same ssh / non-shell gate as the other providers.
- Edits apply live, at the next typed prefix; a fresh tab picks the map up at spawn.
Git generators
git checkout ma ghosts in from your repository's main. Where a branch, tag, or changed file belongs as an argument, DropTerm completes it from the repo the tab sits in: git switch takes branches, git checkout branches and tags, git add and git restore your changed files. Where several names match, the completions menu lists the whole set instead of settling the ghost for one.
The names come from git itself, under a fixed contract:
- Exactly three
gitinvocations, fixed and reviewed: local branches, tags, the short status. Nothing you configure can add, alter, or script a generator. - Nothing leaves the machine: the commands run in the tab's own working directory, with no network and no telemetry.
- The
gitbinary resolves once from the tab's spawn-time$PATHand runs with a reduced environment and a pinnedClocale, so the output stays parseable whatever your desktop locale, and DropTerm's own environment never leaks into it. - A hung generator is killed after five seconds and answers silence. Missing git, not a repo, a failing command: always silence, never a dialog, never a wrong completion.
- Never on a tab spawned as ssh or any non-shell program, and never in a WSL tab: the local-shell gate covers every generated provider (
wsl.exeis not on the shells' list). A WSL tab suggests from history and the typed line alone - its own past arrives through the seeded history file. - Typing never spawns anything. Results are cached; the cache refreshes when the completions menu opens and at the tab's spawn.
- A cached name is the last resort: your history wins, and paths and the table outrank the cache.
- The ghost shows only the letters every matching name shares:
git switch feoverfeature/blablaandfeature/blueghostsature/bl; two names with no shared next letter ghost nothing; a unique name completes fully.
The generators have no toggle. They run on the same contract as the packaged table: nothing executes while you type, and the only failure is the five-second silence.
The menu
The completions menu is rich mode's other surface, drawn over your shell's prompt row (the layout): a candidate list built from every provider at once - every matching history line, path entry, $PATH name, curated subcommand and flag - shown where the ghost would settle for one guess. It exists only in rich mode at a live prompt; native has neither ghost nor menu.
The list is scoped to what you typed: git st leads with the table's stash and status, your matching history line after them; ~/s over src and srv lists both path entries and ghosts the shared r. A bare git - command typed, a space after it - lists git's whole subcommand table; git checkout (a later seat) lists no subcommands. Where the single-choice ghost stays silent, the list itself is the information.
Opening, three ways:
- As you type, with
input_auto_popupon (the default): once the segment at the end of your line reaches two characters and a row has something to insert, the menu opens on its own. A single qualifying row is enough. - With Tab: a bare Tab types the letters every matching row shares - one row goes to its end, with a space - and the list stands over what is left. With nothing to type, the Tab reaches the shell as the shell's own completion key, which completes or lists as usual.
- With
Ctrl+Space: shows the list when a row has letters to add to your typed word, and types nothing. A second press closes it. With nothing to add, the press passes through as the shell's NUL byte.
Filtering and ordering:
- The list re-collects as your line changes and closes when nothing is left to insert. The two-character floor gates the auto-pop's opening only; a Tab- or
Ctrl+Space-opened menu follows the same freshness at any length. - A row that matches only loosely (another case, a reordered subsequence) or equals your whole line can appear in an open menu but never opens one.
- Order: what your context pins down first - the command's subcommands and flags, its cached git names, the typed token's directory entries - then the matching history lines, command names last at the command seat. The single-choice ghost leans the other way: history first.
Keys:
Up/Downmove the highlight (the list scrolls, eight rows at most), wrapping at both ends;Shift+Tabsteps backwards.Entercompletes the highlighted row's remainder into the line and closes the menu. Enter on a line that already equals the highlighted row runs it.Escapecloses the menu and clears the ghost behind it; the line is untouched.Ctrl+Spacecloses the menu and sends nothing to the shell.- A bare
Tabfills the longest common prefix of the rows matching your typed word (case-sensitive), closing the menu on the last one standing; with no common extension, it closes the menu and passes through as the shell's own Tab. Tab never moves the highlight. - Printable keys keep the menu open. Any other key closes it first, then runs its own meaning - the ghost's
Right/Alt+Rightaccepts included. - A completion is typed into the shell's line. Nothing executes without Enter.
Tab in both modes: in native mode, Tab is the shell's own key, byte for byte (\x09 plain, \x1b[Z with Shift): bash lists its files and directories, zsh and fish run their own menus, and DropTerm never claims it. In rich mode, Tab is DropTerm's exactly while it has letters to type - the shared prefix, on the first press, menu open or closed - and the shell's own key whenever it does not (menu closed). Shift+Tab reaches the shell whenever the menu is closed.
Rows: the panel is two lines per row, the label over its dim description, the type badge at the right edge. It is about 560 px wide at the pane's left edge, above the prompt row when it fits there and below it otherwise, at most eight rows and never past about half the pane. Every size follows the font. The selected row is tinted, and each label bolds the part you typed. A row carries an icon, a type badge (cmd / flag / folder / file / hist / env / sub), and a description where one exists - each behind its own key (input_icons, input_badges, input_descriptions). The command's argument hint renders as a line above the list (input_argument_hint); input_compact_rows makes each row one line, the description right-aligned before the badge. The ghost itself never shows a description.
Toggles: input_menu (default true, Settings' Auto complete page) - a flip applies live, a showing menu closing at once; the ghost is untouched. input_auto_popup (default true) - false leaves the list to Tab and Ctrl+Space.