Files
tldr/pages.zh/common/gh-completion.md

20 lines
451 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gh 完成
> 为 GitHub CLI 命令生成 shell 完成脚本。
> 更多信息:<https://cli.github.com/manual/gh_completion>。
- 打印完成脚本:
`gh completion --shell {{bash|zsh|fish|powershell}}`
-`gh` 完成脚本追加到 `~/.bashrc`
`gh completion --shell {{bash}} >> {{~/.bashrc}}`
-`gh` 完成脚本追加到 `~/.zshrc`
`gh completion --shell {{zsh}} >> {{~/.zshrc}}`
- 显示子命令帮助:
`gh completion`