# 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 stdout '^claude,codex$' cp stdout agents-c.txt # Exactly every other agent whose name starts with c, in the registry's # order, from the runner's list. exec sh -c 'for a in $(printf %s "$AGENT_CHOICES" | tr -d ,); do case $a in claude) ;; c*) echo "claude,$a" ;; esac; done; echo :4' 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