Docker标签/命令完成未显示所有命令。

huangapple go评论48阅读模式
英文:

Docker tab/command completion not showing all commands

问题

用户A在我的macOS上安装了oh-my-zsh并启用了docker zsh插件,当我进行选项卡完成时,会看到以下内容:

 $ docker i<tab>
image    -- 管理镜像
images   -- 列出镜像
import   -- 从tarball导入内容以创建文件系统镜像
info     -- 显示系统范围的信息
init     -- 为您的项目创建与Docker相关的启动文件(Docker Inc.,v0.1.0-beta.4)
inspect  -- 返回有关Docker对象的低级信息

我正在为用户B在同一台机器上设置,也使用oh-my-zsh,但与上面漂亮的完成不同,当我执行 docker i<tab> 时,结果是 docker inspect。没有显示其他选项。对于 docker p<tab> 也是一样,只显示了 psprune 的选项,而不显示以字母 p 开头的其他子命令,如 pausepullport 等等。我也没有看到像用户A那样的子命令描述。用户B只看到命令而没有描述。

两台机器都运行相同版本的zsh。

是什么原因解释了为什么对于用户B来说,与用户A相比,docker完成的行为如此不同?

英文:

User A on my macOS with oh-my-zsh installed and docker zsh plugin enabled sees this when I do tab completion:

 $ docker i&lt;tab&gt;
image    -- Manage images
images   -- List images
import   -- Import the contents from a tarball to create a filesystem image
info     -- Display system-wide information
init     -- Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.4)
inspect  -- Return low-level information on Docker objects

I'm setting up User B on the same machine also using oh-my-zsh but instead of the nice completion above, when I do docker i&lt;tab&gt; it results in docker inspect. None of the other options show up. Same with docker p&lt;tab&gt; which just shows the options for ps and prune but none of the other subcommands which begin with the letter p like pause, pull, port, etc. I also don't see the subcommand descriptions like with User A. User B just sees the command without a description.

Both machines are running the same version of zsh.

What might explain why docker completion works so differently for User B compared to User A?

答案1

得分: 1

好的,看起来用户A的oh-my-zsh Docker插件版本较旧,而用户B有更新版本。我认为新版本可能存在问题。

英文:

Ok, looks like User A has an older version of the oh-my-zsh docker plugin while User B has a newer version. I think the new version is probably buggy.

huangapple
  • 本文由 发表于 2023年6月19日 20:36:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76506697.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定