dsh-autosuggest
Modeled on zsh-autosuggestions. When you type the start of a past prompt, gray text completes the rest. The history spans sessions.
Keys
| Key | Action |
|---|---|
| Tab→ | Fills in the highlighted suggestion |
| ↑↓ | Switches between suggestions when there are several matches |
| Esc | Hides the suggestions. They appear again after you change the draft |
Matching rules
- When the input is the start of a past prompt (case-sensitive), gray text after the cursor shows the rest. Above the input box, a list shows up to five matches with their source session and date.
- The history comes from the 50 sessions with the most recent prompts across all sessions, newest first. For identical text, only the newest prompt stays.
- Suggestions appear only for text that you type yourself. Text that dsh-recall puts in the input box does not trigger them.
- When you keep typing along the suggestion, the gray text does not replay. When you switch to another suggestion, the gray text appears again with the Ghost text setting.
The Host half of the plugin registers the read-only route /dsh-autosuggest/prompts. The route reads the prompts that the user typed and sent from the session logs and returns them after the DSH connection check.
Install
The plugin needs DSH 0.2.1-alpha.4 or later.
Add the index source as described in Import the Agent Stash plugin market, then install @agent-stash/dsh-autosuggest from the Discover page.
dsh-stash-kit installs automatically
Like dsh-recall, the plugin installs dsh-stash-kit from npm and enables it on first start.