Quarto Completions
Tab completion for the Quarto CLI, in the shell you already use.
Press Tab
Press Tab and get Quarto’s commands, flags, output formats, log levels, and publishing providers. The input documents are filtered to the ones Quarto can render.
The scripts are generated ahead of time and contain every candidate, so nothing runs Quarto while you type.
Install
curl -fsSL https://m.canouil.dev/quarto-completions/install.sh | bashThe shell is detected from $SHELL. Pass --shell bash, --shell zsh, or --shell fish to override it.
powershell -ExecutionPolicy ByPass -c "irm https://m.canouil.dev/quarto-completions/install.ps1 | iex"Start a new shell afterwards, and the completions are live.
To install offline, or to pin a version, every release carries the completions as a .tar.gz and a .zip, one directory per channel. The installers themselves always read the latest published files, never a release asset.
What it completes
| Where | Candidates |
|---|---|
quarto <TAB> |
Every command, with its description. |
quarto render --<TAB> |
Quarto’s own flags, plus the Pandoc flags Quarto forwards. |
quarto render --to <TAB> |
Every built-in output format. |
quarto render <TAB> |
.qmd, .ipynb, .md, .Rmd, and .markdown documents, and directories. |
quarto publish <TAB> |
The publishing providers, then a path once one is chosen. |
quarto --log-level <TAB> |
debug, info, warning, error, critical. |
quarto install <TAB> |
tinytex, chrome-headless-shell, verapdf. |
Options
Both installers take the same options, each under its own shell’s spelling, apart from --shell. Only the macOS and Linux installer takes --shell, because PowerShell is the only shell the Windows installer serves. The piped form cannot take arguments in PowerShell, so each option also reads an environment variable.
| Option | Environment variable | Effect |
|---|---|---|
--shell |
QUARTO_COMPLETIONS_SHELL |
Which shell to install for: bash, zsh, or fish. Detected from $SHELL when not given. |
--channel |
QUARTO_COMPLETIONS_CHANNEL |
release (default), pre-release, dev, or a Quarto minor such as 1.10. The first two roll as Quarto ships. A minor stays on its line, and every minor from 1.9 onwards is published, the current release included. With none given, the installer matches your Quarto’s own minor when it is published, and falls back to release otherwise. It picks dev on its own when the quarto on PATH reports version 99.9.9. |
--dry-run |
Report every path that changes, then exit. | |
--uninstall |
QUARTO_COMPLETIONS_UNINSTALL=1 |
Remove the script and the managed block. |
--base-url |
QUARTO_COMPLETIONS_BASE_URL |
Where to download from. This is this site, unless you are testing a copy of it. |
-h, --help |
List these options and exit. |
| Option | Environment variable | Effect |
|---|---|---|
-Channel |
QUARTO_COMPLETIONS_CHANNEL |
release (default), pre-release, dev, or a Quarto minor such as 1.10. The first two roll as Quarto ships. A minor stays on its line, and every minor from 1.9 onwards is published, the current release included. With none given, the installer matches your Quarto’s own minor when it is published, and falls back to release otherwise. It picks dev on its own when the quarto on PATH reports version 99.9.9. |
-DryRun |
Report every path that changes, then exit. | |
-Uninstall |
QUARTO_COMPLETIONS_UNINSTALL=1 |
Remove the script and the managed block. |
-BaseUrl |
QUARTO_COMPLETIONS_BASE_URL |
Where to download from. This is this site, unless you are testing a copy of it. |
There is no --help: run Get-Help on the saved script to list these options.
Everything is written under your home directory, apart from zsh on a machine with Homebrew, where the file goes in the prefix’s own completions directory. Nothing needs root, and nothing is written with sudo. Re-running updates the file the last run wrote, wherever it is, rather than appending to it or starting a second copy somewhere else. Nothing checks for a stale install on its own, so re-run after upgrading Quarto. The installer reports any version disagreement it finds. See The completions are out of date.
Each file is checked against the SHA-256 published in manifest.json before it is written, and the installer stops if they disagree. That guards against a truncated or corrupted download. It is not a guard against a compromised host, which can serve a matching script and manifest together. The trust boundary is the HTTPS connection to this site.
Uninstall
curl -fsSL https://m.canouil.dev/quarto-completions/install.sh | bash -s -- --uninstall$env:QUARTO_COMPLETIONS_UNINSTALL = '1'
powershell -ExecutionPolicy ByPass -c "irm https://m.canouil.dev/quarto-completions/install.ps1 | iex"
Remove-Item Env:\QUARTO_COMPLETIONS_UNINSTALLClear that variable afterwards, as the last line above does. It outlives the run that needed it. The piped form takes no arguments that say otherwise, so a later install in the same session reads it and uninstalls instead.
Known limitations
Formats and shortcodes supplied by installed extensions are not completed. Reading them needs Quarto to run on every keystroke, which is the cost this project exists to remove.
Commands Quarto hides from quarto --help, such as dev-call, are left out of the release, pre-release, and minor channels on purpose. That help output does not show them either. They are completed on a dev channel instead. See Channels.