Skip to content

Bash file completion not working for docker stack deploy -c #6689

Description

@geki007

Description

I think since "new bash completion" the completion for docker stack deploy (-c arg) does not work like before

Reproduce

  1. Open Terminal
  2. Enable bash completion
  3. docker stack deploy -c <PRESS TAB for bash file completion>

Expected behavior

-c ... does not complete filenames but it should
If you enter something or delete -c and press TAB you see it only completes stack names

docker version

Client: Docker Engine - Community
Version: 29.1.2
API version: 1.52
Go version: go1.25.5
Git commit: 890dcca
Built: Tue Dec 2 21:55:45 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.1.2
API version: 1.52 (minimum version 1.44)
Go version: go1.25.5
Git commit: de45c2a
Built: Tue Dec 2 21:55:45 2025
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v2.2.0
GitCommit: 1c4457e00facac03ce1d75f7b6777a7a851e5c41
runc:
Version: 1.3.4
GitCommit: v1.3.4-0-gd6d73eb8
docker-init:
Version: 0.19.0
GitCommit: de40ad0

docker info

Client: Docker Engine - Community
Version: 29.1.2
Context: default
Debug Mode: false
Server:
Containers: 6
Running: 5
Paused: 0
Stopped: 1
Images: 19
Server Version: 29.1.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog

Additional Info

cobra.ShellCompDirectiveNoFileComp could be the cause

ValidArgsFunction: completeNames(dockerCLI),

returnnames, cobra.ShellCompDirectiveNoFileComp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions