Skip to content

Rewrite the custom completions in the completion language - #1316

Draft
philocalyst wants to merge 93 commits into
nushell:mainfrom
philocalyst:completion-language
Draft

philocalyst wants to merge 93 commits into
nushell:mainfrom
philocalyst:completion-language

Conversation

@philocalyst

@philocalyst philocalyst commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This rewrites 84 custom completion modules as declarations in Nushell's new completion language and adds completions for 8 more tools. An export complete block describes each command route once: its flags, positionals, value domains and the rules between options. Separate export syntax grammars parse structured arguments such as s3:// URIs, git ranges and tmux targets. Live data comes from @non-destructive providers that only read and return nothing on error, so completion can run them on every keystroke.

Cover 64 routes; s3:// URIs parse and resources complete live.
Undeclared commands fall back to aws_completer, as in nushell#1315.
--style and --map-syntax values parse; languages and themes come from bat.
Folders, collections, organizations and items come from an unlocked vault.
Cover 36 routes, up from 19; packages, targets, features and profiles
come from cargo metadata.
Cover 44 routes, up from 33; MCP servers, plugins and agents
complete from config.
Models, profiles, features and sessions complete from CODEX_HOME.
Cover 31 routes, up from 3; dependencies come from pubspec.yaml.
Cover 120 routes, up from 44; containers, images, networks, volumes,
contexts and compose services complete live.
Cover 38 routes, up from one extern; projects, package references
and tools complete live.
Devices, partitions and variables come from fastboot.
Cover 29 routes, up from 3; devices, platforms and flavors complete live.
Valued --option:value options are modelled as taking the next word.
Valued --option:value options are modelled as taking the next word.
Cover every route, alias and flag from nushell#1312, with its completers and
alias expansion; keep the nushell#1307 fix.
Hosts, users, keys and ciphers come from ssh/ssh-hosts.nu.
Covers chown, chgrp, su, id, groups, killall, pkill and pgrep.
Cover 11 routes, up from 5; templates come from the local package cache.
Collapse 230 externs into 90 routes; domains, networks, pools and
snapshots complete live.
Cover 28 routes, up from 21; keep the nushell#1305 fixes and the cache check.
Cover 128 routes, up from 19; sessions and layouts complete live.
Codecs, formats, pixel formats, filters and hwaccels come from ffmpeg.
Covers BSD and GNU find; -exec owns a nested command line.
Contexts, namespaces, resources and names come from
read-only kubectl calls.
Sessions, windows and blocks come from the running rex.
Targets parse as session:window.pane, each part
completing from the running server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant