Skip to content

Add docker run image:tag completion support#229

Merged
lucieleblanc merged 5 commits into
mainfrom
app-3480/command-spec-docker-image-tags
Apr 6, 2026
Merged

Add docker run image:tag completion support#229
lucieleblanc merged 5 commits into
mainfrom
app-3480/command-spec-docker-image-tags

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

@lucieleblanc lucieleblanc commented Apr 1, 2026

Summary

Handle the image:tag colon-delimited pattern in docker run completions. When a user types docker run <image>:<TAB>, the completions menu now suggests available tags for that image.

Resolves APP-3480

Changes

  • New generator run_image_with_tags in docker.rs: Uses command_from_tokens to detect a colon in the current token.
    • No colon (e.g., docker run <TAB>): Lists all images with metadata (same as previous behavior)
    • Colon present (e.g., docker run nginx:<TAB>): Extracts the image name and lists available local tags for that image
  • Updated relevant subcommand JSON specs to use the new generator
  • Removed dead code

Screenshots

docker run <TAB> — Image listing (normal mode)

docker run images

docker run alpine:<TAB> — Tag completion

docker run alpine tags

docker run nginx:<TAB> — Tag completion

docker run nginx tags

Testing

  • All existing tests pass (script/presubmit)
  • Verified end-to-end with a local Warp build against Docker images with multiple tags (alpine:latest, alpine:3.18, alpine:3.19, nginx:latest, nginx:alpine)

Conversation: https://staging.warp.dev/conversation/54b392e1-150a-464c-b621-8e1e53af592c
Run: https://oz.staging.warp.dev/runs/019d4b05-f012-73e8-9a12-cac1c5d45b82

This PR was generated with Oz.

oz-agent added 2 commits April 1, 2026 22:07
Add run_image_with_tags generator that uses command_from_tokens to detect
the colon separator in the current token. When a colon is present (e.g.
'nginx:'), it lists available tags for that specific image. Without a
colon, it falls back to listing all images with metadata (same as the
previous behavior).

Updated both 'docker run' and 'docker container run' specs to use the
new generator.

Resolves APP-3480

Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

APP-3480 [Docker] Handle image:tag colon-delimited pattern in docker run

docker run <image>:<TAB> should suggest available tags for that image. The existing generator lists images but doesn't handle the colon-delimited image:tag pattern for tag-specific completion.

See GitHub #4489

lucieleblanc and others added 2 commits April 3, 2026 13:17
Replace old screenshots with comprehensive re-validation tests:
- docker run <Tab> (image name completions)
- docker run nginx:<Tab> (tag completions)
- docker image history <Tab> (image name completions)
- docker image history nginx:<Tab> (tag completions)

Co-Authored-By: Oz <oz-agent@warp.dev>
Copy link
Copy Markdown
Contributor Author

Re-validation of image_with_tags generator

Tested the unified image_with_tags generator end-to-end in a local Warp build with the following Docker images: nginx:latest, nginx:alpine, ubuntu:latest, alpine:latest.

Test 1: docker run <Tab> — Image name completions (no colon)

Shows all local images with metadata (ID, tag, size):

docker_run_images

Test 2: docker run nginx:<Tab> — Tag completions (with colon)

Shows only tags for the nginx image (nginx:alpine, nginx:latest):

docker_run_nginx_tags

Test 3: docker image history <Tab> — Image name completions

Shows all local images for docker image history subcommand:

docker_image_history

Test 4: docker image history nginx:<Tab> — Tag completions

Shows only tags for nginx in the docker image history context:

docker_image_history_tags

Summary

All tests pass — the image_with_tags generator correctly:

  • Lists all local images by default (without colon)
  • Switches to showing tags for a specific image when a colon is typed
  • Works across multiple subcommands (docker run, docker image history, etc.)

@lucieleblanc
Copy link
Copy Markdown
Contributor Author

Screenshots:
image
image

image image

@lucieleblanc lucieleblanc marked this pull request as ready for review April 3, 2026 19:20
@lucieleblanc lucieleblanc merged commit 4da149d into main Apr 6, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the app-3480/command-spec-docker-image-tags branch April 6, 2026 14:51
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.

3 participants