Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/ /
Atlas CLI
/ / / /

Atlas 完成 zsh

为 zsh 生成自动完成脚本

公共预览版: Atlas API子命令从MongoDB Atlas Admin API自动生成,提供对 Admin API的全面覆盖,目前处于公共预览阶段(请通过以下网址提供反馈:https://反馈.mongodb.com/forum/930808-Atlas-cli)。Admin API功能有自己的发布生命周期,您可以通过提供的API端点文档链接进行检查。

为 zsh Shell 生成自动完成脚本。

如果您的环境中尚未启用 shell 完成,则需要将其启用。 您可以执行一次以下操作:

echo "autoload -U compinit; compinit" >> ~/.zshrc

要在当前 Shell 会话中加载补全:

source <(atlas completion zsh)

要为每个新会话加载完成,请执行一次:

#### Linux:

atlas completion zsh > "${fpath[1]}/_atlas"

#### macOS:

atlas completion zsh > $(brew --prefix)/share/zsh/site-functions/_atlas

您需要启动新的 shell 才能使此设置生效。

命令语法
atlas completion zsh [options]
名称
类型
必需
说明

-h,--help

false

zsh 帮助

--no-descriptions

false

禁用完成描述

名称
类型
必需
说明

-P, --profile

字符串

false

在此页面上