mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
devvm runs every VM on Lima, so the command line has no backend choice: - --backend is gone from devvm, build, rebuild, images, images rm, gc, space, doctor and setup (addBackendFlag, addBackendFilterFlag, setup's own, checkFlagValue's case, its completion); a removed flag now fails as an unknown flag (exit 2). - devvm setup no longer asks for or saves a default backend; config.toml and settings.json have no backend key (settings.KeyBackend, Values and Defaults' Backend, checkBackend, Value.With, Source.File, FromFlag). - Tables lose BACKEND: ls, images (both tables), space (both tables); doctor's FEATURE table is FEATURE and SUPPORT for Lima. space's images row is freed by images rm. - --json keeps every backend field (ls, images, tool records, space, doctor's backend, backend_source "built-in" and every backend's features). - The registry keeps Lookup, For and Default: For(d, vm) gives a VM its recorded backend and a new VM NewVMs, else Default; tests set NewVMs. vm.Env's lookups lose the flag parameter, found.flagIgnored and Options.Backend. - Messages removed: backend_unknown, backend_unknown_default, default_backend, backend_help, doctor_backend_from, backend_flag_ignored; backend_unknown_vm stays (a VM's recorded backend), linked to backends#a-vms-backend. - Docs: Backends' choosing section becomes "A VM's backend"; settings, setup, images, gc, space, doctor, commands and install pages lose --backend and BACKEND; Contributing gains "How a backend plugs in". - Tests: unit tests for For, settings, setup, doctor's table, the tables; CLI scripts check --backend as an unknown flag on devvm, build, restart, images, gc, space, doctor and setup, and a config.toml backend key as unknown; e2e's table checks lose the column. Co-Authored-By: Claude Opus 5.5 <[email protected]>
80 lines
2.0 KiB
Plaintext
80 lines
2.0 KiB
Plaintext
# devvm completion prints a script for bash, zsh and fish, and nothing else.
|
|
exec devvm completion bash
|
|
stdout '__devvm'
|
|
! stderr .
|
|
exec devvm completion zsh
|
|
stdout '^#compdef devvm$'
|
|
exec devvm completion fish
|
|
stdout 'complete -c devvm'
|
|
! exec devvm completion powershell
|
|
stderr '^devvm: arg_not_choice choices=bash, zsh, fish command=devvm completion given=powershell$'
|
|
stderr '^usage_help command=devvm completion$'
|
|
! stdout .
|
|
|
|
# The commands users run, not the hidden ones; devvm takes no image.
|
|
exec devvm __complete ''
|
|
stdout '^build\t'
|
|
stdout '^completion\t'
|
|
! stdout '^base$'
|
|
! stdout '^claude$'
|
|
! stdout '^_'
|
|
! stdout '^version'
|
|
stdout '^:4$'
|
|
|
|
# Your layers are image names, and shared tools aren't; the layers given
|
|
# are left out.
|
|
mkdir $XDG_CONFIG_HOME/devvm/layers
|
|
cp foo.sh $XDG_CONFIG_HOME/devvm/layers/foo.sh
|
|
exec devvm __complete build docker+
|
|
stdout '^docker\+foo$'
|
|
stdout '^docker\+nix$'
|
|
! stdout '^docker\+docker$'
|
|
! stdout 'claude|node'
|
|
|
|
# --tools, --agents and --layers: comma-separated lists of their part's
|
|
# names, and none.
|
|
exec devvm __complete --agents claude,c
|
|
cmp stdout agents-c.txt
|
|
exec devvm __complete --layers ''
|
|
stdout '^foo$'
|
|
stdout '^none$'
|
|
! stdout '^base$'
|
|
exec devvm __complete --tools n
|
|
stdout '^node$'
|
|
stdout '^none$'
|
|
exec devvm __complete setup --agents ''
|
|
stdout '^opencode$'
|
|
|
|
# tools add and rm take shared tools only, each a word of its own, those
|
|
# given left out.
|
|
exec devvm __complete tools add ''
|
|
stdout '^python$'
|
|
! stdout '^foo$'
|
|
! stdout '^base$'
|
|
exec devvm __complete tools rm python c
|
|
stdout '^claude$'
|
|
stdout '^codex$'
|
|
! stdout python
|
|
exec devvm __complete tools add python ''
|
|
! stdout '^python$'
|
|
stdout '^claude$'
|
|
|
|
# Flags: features, the ports keywords; never file names.
|
|
exec devvm __complete setup --features fzf,
|
|
stdout '^fzf,omb$'
|
|
! stdout '^fzf,fzf$'
|
|
exec devvm __complete --ports ''
|
|
stdout '^all$'
|
|
stdout '^none$'
|
|
exec devvm __complete rm ''
|
|
stdout '^:4$'
|
|
exec devvm __complete completion ''
|
|
stdout '^fish$'
|
|
! stub_calls
|
|
|
|
-- foo.sh --
|
|
#!/bin/bash
|
|
-- agents-c.txt --
|
|
claude,codex
|
|
:4
|