Rich input
Rich input finishes the line the way Warp does it: the rest of the command appears as dim ghost text, with a completion menu over the line. It is one setting, and the line stays the shell's. The default is native - the bare shell, every keystroke forwarded verbatim, no ghost, no menu.
Autosuggestions covers what gets suggested, and from where.
The two modes
input_mode in Configuration - global, or per profile through the profile field of the same name:
native(the default) - the bare shell. Every keystroke reaches the PTY verbatim; nothing suggests and nothing is drawn.rich- the shell's own line with the suggestions over it. Keystrokes reach the shell exactly as innative, so editing, history, and key bindings stay the shell's. DropTerm reads the typed text off the screen and draws two overlays after it: the ghost and the completion menu.
One input is on screen either way - the shell's, with the shell's caret - and line discipline, echo, and history are the shell's. No shell integration is required.
The setup wizard's suggestions page offers rich in one press. The default stays native until you answer it (settings).
Where and when the overlays show
- Overlays show only in a live pane: focused, nothing running in the foreground (vim, ssh, cargo), scrolled to the bottom, and a prompt DropTerm can recognize. A new tab's first prompt, at the top of its still-empty screen, is live.
- When any of that fails, every key is the shell's: a hidden suggestion costs a little richness, a wrongly shown one would type into a program's input.
- The overlays return on their own when the prompt is live again; flipping the mode in Settings applies live.
The keys
With the menu closed, every key is the shell's except the few named here:
| Key | The menu is closed | The menu is showing |
|---|---|---|
| a printable key | the shell's | goes to the shell; the menu stays open and its rows follow the typed text |
| Up / Down | the shell's (its history) | move the highlight, wrapping at both ends |
| Shift+Tab | the shell's | step backwards |
| Tab | types the letters every matching row shares - a single row to its end, with a space - and otherwise is the shell's own Tab | types the letters the rows still share, the list staying over what is left; with nothing left to type, closes the list and is the shell's own Tab |
| Enter | the shell's (runs the line) | completes the highlighted row and closes; on a line that already equals the row, closes and runs |
| Escape | clears the ghost while it shows - it stays cleared until the line changes - and otherwise is the shell's | closes the menu and clears the ghost behind it, the line untouched |
| Ctrl+Space | shows the list when a row has letters to add to the word you typed, otherwise the shell's | closes the list, nothing sent to the shell |
| Right / Alt+Right | accepts the ghost whole / one word while it shows, otherwise the shell's | closes the menu first, then the same |
| any other key | the shell's | closes the menu, then the key's own meaning |
- The list opens three ways: as you type (with
input_auto_popup), by a typing Tab, and by Ctrl+Space. Ctrl+Space opens with nothing typed and closes on a second press. With no row able to add letters, it is the shell's own key. - Tab never merely opens the list and never moves the highlight (the arrow keys do that): it types, or it is the shell's own key.
- When DropTerm knows the candidates, the letters are the ones bash's own Tab would type. When it does not (no exact match, a loose match such as another case, nothing left to add, or matches that share no next letter), the shell completes its own way or lists. Type on until a row matches.
- Completions see through
$(...)substitutions, pipes, and;chains - the segment the cursor stands in is what completes.
The menu's layout
The menu is a panel over the prompt row, never a second input:
- Rows - two lines each: the label on top, its description in dim text under it, the type badge (cmd, flag, folder, file, hist, env, sub) at the panel's right edge.
input_compact_rowsmakes a row one line, the description right-aligned before the badge. - Columns - row icons share one fixed column, as wide as the widest, so labels start at one edge whatever the icon; badges end at one edge. An overlong label or description is cut with an ellipsis.
- The panel - about 560 px wide at the default font, at the pane's left edge. Above the prompt row when it fits there, otherwise below it. At most 8 rows, never past about half the pane. The rest scroll under Up and Down.
- Sizes - every size follows the character cell, so zooming the font scales the whole menu with the text.
The limits of the screen read
DropTerm reads the line off the screen, and that sets these limits:
- Suggestions work only on a prompt row that has not wrapped and whose text starts with the prompt. The honest-silence rules in Autosuggestions apply where the shell's prompt cannot be recognized.
- A row completes the typed text only when its label starts with that text, case included. A row matched loosely still lists but inserts nothing; Enter on it closes the menu.
- DropTerm's view of the line is the shell's echo of it. In the instant between a keystroke and its echo, a menu key can act on the line as it was.
- DropTerm re-reads the prompt whenever a prompt is due: when the shell reports one starting (shell integration, default on), and when an external command finishes. A prompt that changes while nothing runs - a
cdunder a directory-showing prompt, a venv'sactivate, a branch - is picked up at its own prompt. Without the marks, only a finishing command re-reads the prompt: acdonshleaves suggestions keyed to the stale prompt until the next external command finishes.
The settings
Settings' Auto complete page carries every key, each its own (see Configuration for the full table): the mode, the ghost and menu toggles, the auto-popup, and the menu's chrome - row descriptions, type badges, row icons, the argument hint line - with compact_rows as the density switch.