Command reference
ed completions source
Prints the fallback line that loads one completion script directly.
ed completions source [--shell <zsh|bash|fish>] [--json]| Name | Type / values | Default | What it does |
|---|---|---|---|
--shell <shell> |
zsh, bash or fish |
zsh |
Select the completion script. |
--json |
flag | off | Emit shell and source in one JSON object. |
Plain output is ready to paste into the selected shell's startup file:
$ ed completions sourcesource $HOME/.local/share/zsh/site-functions/_edJSON keeps the selected shell explicit:
{ "shell": "fish", "source": "source $HOME/.config/fish/completions/ed.fish"}The path comes from the same shared operation used by the Copy button in Terminal settings. It prefers the recorded installed script and otherwise prints the line for the directory where installation would place it. An unsupported shell exits 3 without output.
Where to go next
ed completions install, write the scripts- Getting started with
ed, the rest of this group - All
edcommands