From d55e576fc86c41d012aa2f7d93cfd22bbb734727 Mon Sep 17 00:00:00 2001 From: maidamaliziasimnw Date: Fri, 10 Jul 2026 18:59:04 +0000 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=E8=A1=A5=E5=85=85=20Shell=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=A1=A5=E5=85=A8=E4=BD=BF=E7=94=A8=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=EF=BC=88bash/zsh/fish/PowerShell=EF=BC=8C=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E5=8F=8C=E8=AF=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 20 ++++++++++++++++++++ README.zh-CN.md | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/README.md b/README.md index e5e4318..07fc871 100644 --- a/README.md +++ b/README.md @@ -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 --help` for install-once instructions per shell. + ## Global Parameters | Parameter | Description | Example | diff --git a/README.zh-CN.md b/README.zh-CN.md index 6a8879d..3839742 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -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 --help`。 + ## 全局参数 | 参数 | 说明 | 示例 |