docs(readme): 补充 Shell 自动补全使用说明(bash/zsh/fish/PowerShell,中英双语)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
maidamaliziasimnw 2026-07-10 18:59:04 +00:00
parent 604303e953
commit d55e576fc8
2 changed files with 40 additions and 0 deletions

View File

@ -697,6 +697,26 @@ Get-Content issue.json | gitlink-cli api POST /Gitlink/forgeplus/issues --body-s
gitlink-cli api GET /Gitlink/forgeplus/commits --query 'page=1&limit=5'
```
### Shell Completion
`gitlink-cli` ships with built-in shell completion (bash / zsh / fish / PowerShell):
```bash
# Bash (add to ~/.bashrc)
source <(gitlink-cli completion bash)
# Zsh (add to ~/.zshrc)
source <(gitlink-cli completion zsh)
# Fish
gitlink-cli completion fish | source
# PowerShell
gitlink-cli completion powershell | Out-String | Invoke-Expression
```
Run `gitlink-cli completion <shell> --help` for install-once instructions per shell.
## Global Parameters
| Parameter | Description | Example |

View File

@ -571,6 +571,26 @@ Get-Content issue.json | gitlink-cli api POST /Gitlink/forgeplus/issues --body-s
gitlink-cli api GET /Gitlink/forgeplus/commits --query 'page=1&limit=5'
```
### Shell 自动补全
`gitlink-cli` 内置 bash / zsh / fish / PowerShell 补全:
```bash
# Bash加入 ~/.bashrc
source <(gitlink-cli completion bash)
# Zsh加入 ~/.zshrc
source <(gitlink-cli completion zsh)
# Fish
gitlink-cli completion fish | source
# PowerShell
gitlink-cli completion powershell | Out-String | Invoke-Expression
```
各 shell 的一次性安装方式见 `gitlink-cli completion <shell> --help`
## 全局参数
| 参数 | 说明 | 示例 |