Skip to content
说明生成 powershell 的自动补全脚本
用法sbx completion powershell [flags]

描述 ​

生成 powershell 的自动补全脚本。

在当前 shell 会话中加载补全脚本:

sbx completion powershell | Out-String | Invoke-Expression

要让每个新会话都加载补全脚本,请把上面命令的输出添加到你的 powershell profile 中。

选项 ​

选项默认值说明
--no-descriptions禁用补全说明

全局选项 ​

选项默认值说明
--cloud改为调用 Docker Cloud Sandboxes API,而不是本地 sandboxd(支持的动词正在逐步增加,运行 sbx --cloud --help 查看当前列表)
-D, --debug启用调试日志
--no-input从不提示;需要应答的命令会直接失败,并给出应当运行的命令

示例 ​

console
# 在当前会话中加载补全脚本
sbx completion powershell | Out-String | Invoke-Expression

# 为每个新会话安装补全脚本
sbx completion powershell >> $PROFILE

参见 ​