From 3780d8dae1b5e8f2929a199d898adc342df6f730 Mon Sep 17 00:00:00 2001 From: abgox Date: Sat, 6 Jul 2024 11:51:30 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20pages=20from=20@=20abgox/PSCom?= =?UTF-8?q?pletions@6d50f6618dafe5f681d03a6610ca4e32eab8f3b6=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- completions/pnpm/guid.txt | 2 +- completions/pnpm/language/en-US.json | 3 +++ completions/pnpm/language/zh-CN.json | 3 +++ completions/psc/guid.txt | 2 +- completions/psc/language/en-US.json | 5 +++-- completions/psc/language/zh-CN.json | 5 +++-- docs/.vitepress/dist/404.html | 2 +- docs/.vitepress/dist/en-US/command/index.html | 2 +- docs/.vitepress/dist/en-US/completion/index.html | 2 +- docs/.vitepress/dist/en-US/contribute/index.html | 2 +- docs/.vitepress/dist/en-US/index.html | 2 +- docs/.vitepress/dist/hashmap.json | 2 +- docs/.vitepress/dist/zh-CN/command/index.html | 2 +- docs/.vitepress/dist/zh-CN/completion/index.html | 2 +- docs/.vitepress/dist/zh-CN/contribute/index.html | 2 +- docs/.vitepress/dist/zh-CN/index.html | 2 +- en-US/command/index.html | 2 +- en-US/completion/index.html | 2 +- en-US/contribute/index.html | 2 +- en-US/index.html | 2 +- hashmap.json | 2 +- zh-CN/command/index.html | 2 +- zh-CN/completion/index.html | 2 +- zh-CN/contribute/index.html | 2 +- zh-CN/index.html | 2 +- 26 files changed, 34 insertions(+), 26 deletions(-) diff --git a/404.html b/404.html index 2e631dc..e79e83c 100644 --- a/404.html +++ b/404.html @@ -15,7 +15,7 @@
- + \ No newline at end of file diff --git a/completions/pnpm/guid.txt b/completions/pnpm/guid.txt index acb1966..be36712 100644 --- a/completions/pnpm/guid.txt +++ b/completions/pnpm/guid.txt @@ -1 +1 @@ -3c0354fd-a0df-4580-bbd9-560f7bb071b4 +cc5411a7-a637-499b-ad7e-6b95b93f4b53 diff --git a/completions/pnpm/language/en-US.json b/completions/pnpm/language/en-US.json index 674ab7c..a0839d6 100644 --- a/completions/pnpm/language/en-US.json +++ b/completions/pnpm/language/en-US.json @@ -75,6 +75,9 @@ }, { "name": "--workspace", + "alias": [ + "-w" + ], "tip": "Only adds the new dependency if it is found in the workspace" } ] diff --git a/completions/pnpm/language/zh-CN.json b/completions/pnpm/language/zh-CN.json index 9d2655c..adc6f1a 100644 --- a/completions/pnpm/language/zh-CN.json +++ b/completions/pnpm/language/zh-CN.json @@ -75,6 +75,9 @@ }, { "name": "--workspace", + "alias": [ + "-w" + ], "tip": "只有在 workspace 中找到新依赖时才添加它" } ] diff --git a/completions/psc/guid.txt b/completions/psc/guid.txt index 361cf7b..087bc52 100644 --- a/completions/psc/guid.txt +++ b/completions/psc/guid.txt @@ -1 +1 @@ -e7066493-00cf-41e5-bf10-acaa490bfbf6 +4e284f57-7d07-4605-ad3a-67823a7bc9be diff --git a/completions/psc/language/en-US.json b/completions/psc/language/en-US.json index 60ae834..8b52491 100644 --- a/completions/psc/language/en-US.json +++ b/completions/psc/language/en-US.json @@ -1447,7 +1447,8 @@ "<@Red>PSCompletions module update failed.\n", "<@Yellow>Possible reasons for failure:\n", "1. Network issue.\n", - "2. Permissions issue, In version 4.0.0+, you must install with user permissions.(<@Magenta>-Scope CurrentUser<@Yellow>)\n", + "2. If you used the scoop package manager to install PSCompletions, you should also use scoop to update it.(<@Magenta>scoop update PSCompletions<@Yellow>)\n", + "3. Permissions issue, In version 4.0.0+, you must install with user permissions.(<@Magenta>-Scope CurrentUser<@Yellow>)\n", " - Permission issue for upgrading modules from v3.x.x to v4.x.x in Windows PowerShell(powershell)\n", " - If you are using Windows PowerShell(powershell) and are updating modules, you should first remove all PSCompletions modules from your computer.\n", " - Then use <@Magenta>Install-Module PSCompletions -Scope CurrentUser<@Yellow> to install the latest version of PSCompletions module.\n", @@ -1457,7 +1458,7 @@ " - Then use <@Magenta>Install-Module PSCompletions -Scope CurrentUser<@Yellow> to install the latest version of PSCompletions module.\n", " - <@Magenta>-Scope CurrentUser<@Yellow> is required, <@Red> cannot use '-Scope AllUser'<@Yellow>\n", " - You are free to handle width the previously backed up module directory.\n", - "3. For other reasons, please submit an issue. ( https://github.com/abgox/PSCompletions/issues )\n" + "4. For other reasons, please submit an issue. ( https://github.com/abgox/PSCompletions/issues )\n" ] }, "update_info": [ diff --git a/completions/psc/language/zh-CN.json b/completions/psc/language/zh-CN.json index 755255c..7865bc7 100644 --- a/completions/psc/language/zh-CN.json +++ b/completions/psc/language/zh-CN.json @@ -1449,7 +1449,8 @@ "<@Red>PSCompletions 模块更新失败, 请检查原因\n", "<@Yellow>可能的失败原因:\n", "1. 网络问题\n", - "2. 权限问题, 在 4.0.0+ 版本中, 你必须以用户权限(<@Magenta>-Scope CurrentUser<@Yellow>)安装\n", + "2. 如果你使用了 scoop 包管理器安装 PSCompletions, 你也应该使用 scoop 更新它(<@Magenta>scoop update PSCompletions<@Yellow>)\n", + "3. 权限问题, 在 4.0.0+ 版本中, 你必须以用户权限(<@Magenta>-Scope CurrentUser<@Yellow>)安装\n", " - 在 Windows PowerShell(powershell) 中将模块从 v3.x.x 升级到 v4.x.x 的权限问题\n", " - 如果你正在使用 Windows PowerShell(powershell), 且正在升级模块, 此时, 你应该先删除电脑中所有的 PSCompletions 模块\n", " - 然后使用 <@Magenta>Install-Module PSCompletions -Scope CurrentUser<@Yellow> 来安装最新版本的 PSCompletions 模块\n", @@ -1459,7 +1460,7 @@ " - 然后使用 <@Magenta>Install-Module PSCompletions -Scope CurrentUser<@Yellow> 来安装最新版本的 PSCompletions 模块\n", " - <@Magenta>-Scope CurrentUser<@Yellow> 必须指定, <@Red>不能使用 -Scope AllUser<@Yellow>\n", " - 你可以看情况处理之前备份的模块目录\n", - "3. 其他原因, 请提交 issue ( https://github.com/abgox/PSCompletions/issues )\n" + "4. 其他原因, 请提交 issue ( https://github.com/abgox/PSCompletions/issues )\n" ] }, "update_info": [ diff --git a/docs/.vitepress/dist/404.html b/docs/.vitepress/dist/404.html index 2e631dc..e79e83c 100644 --- a/docs/.vitepress/dist/404.html +++ b/docs/.vitepress/dist/404.html @@ -15,7 +15,7 @@
- + \ No newline at end of file diff --git a/docs/.vitepress/dist/en-US/command/index.html b/docs/.vitepress/dist/en-US/command/index.html index c5962af..e2a5dcc 100644 --- a/docs/.vitepress/dist/en-US/command/index.html +++ b/docs/.vitepress/dist/en-US/command/index.html @@ -18,7 +18,7 @@
Skip to content
  • Waiting...
    • You can trigger completion by running psc, then learn about them by completion tip.
    • View the README file of PSCompletions.
    • Enter 'psc' and press 'Enter' to print some module information
- + \ No newline at end of file diff --git a/docs/.vitepress/dist/en-US/completion/index.html b/docs/.vitepress/dist/en-US/completion/index.html index 1cd4fae..352040d 100644 --- a/docs/.vitepress/dist/en-US/completion/index.html +++ b/docs/.vitepress/dist/en-US/completion/index.html @@ -97,7 +97,7 @@ ] } ] - + \ No newline at end of file diff --git a/docs/.vitepress/dist/en-US/contribute/index.html b/docs/.vitepress/dist/en-US/contribute/index.html index 7d283e4..c65a3e1 100644 --- a/docs/.vitepress/dist/en-US/contribute/index.html +++ b/docs/.vitepress/dist/en-US/contribute/index.html @@ -18,7 +18,7 @@
Skip to content

About PR (Pull Request)

  1. Prerequisite: You should read About the structure of completion json file first.
  2. You should fork PSCompletions, and clone to your machine.
  3. After Changing, you should commit and create the PR.

1. Update the content of completion json file

  • Patch some tips of the completion.(tip attributes)
  • Add some missing parts for the completion.
    • The missing parts can be viewed by using the compareJson.ps1 script.
      • Take git for example.
      • You can view the missing parts of the zh-CN.json file (Compared to the en-US.json file) by using the following command.
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json .\completions\git\language\en-US.json
      • If it's compared to the first language configured in config.json, the second parameter can also be omitted.
        • It's usually compared to the first language, so the following commands are the most common usage.
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json

2. Add language

  1. In the completions directory, select the language you want to add.
  2. Add the language identifier to the language in the config.json file.
  3. Add a json file with the same name as the language identifier in the language directory.
    • You can copy the original json file and rename it.
  4. Translate the contents of the tip attribute.

3. Add a new completion

  1. Run it in the project root directory. .\script\create.ps1
    • For the convenience of debugging, create.ps1 will link the created completion directory to the completions directory of the PSCompletions module.
      • So PSCompletions module must be installed and imported before running create.ps1.
        • Install-Module PSCompletions -Scope CurrentUser
        • Import-Module PSCompletions
    • After the PR is committed and merged, you should use psc rm to remove this completion and psc add to re-add it.
  2. Follow the prompts.
  3. Modify the new completion.
  4. Modify config.json as required.
- + \ No newline at end of file diff --git a/docs/.vitepress/dist/en-US/index.html b/docs/.vitepress/dist/en-US/index.html index 2a3e357..6e4fecb 100644 --- a/docs/.vitepress/dist/en-US/index.html +++ b/docs/.vitepress/dist/en-US/index.html @@ -18,7 +18,7 @@
Skip to content

PSCompletions

A completion manager for better and simpler use completions in PowerShell.

- + \ No newline at end of file diff --git a/docs/.vitepress/dist/hashmap.json b/docs/.vitepress/dist/hashmap.json index 37deb93..dcfc033 100644 --- a/docs/.vitepress/dist/hashmap.json +++ b/docs/.vitepress/dist/hashmap.json @@ -1 +1 @@ -{"en-us_index.md":"CI-biTWM","en-us_contribute_index.md":"BmN8Tggo","zh-cn_command_index.md":"CoLKJbH5","zh-cn_contribute_index.md":"BXvYV-wY","en-us_command_index.md":"DQbFAMce","zh-cn_index.md":"CTEpn9V-","en-us_completion_index.md":"HuLSXfT2","zh-cn_completion_index.md":"CRcCabc9"} +{"zh-cn_command_index.md":"CoLKJbH5","en-us_command_index.md":"DQbFAMce","zh-cn_contribute_index.md":"BXvYV-wY","en-us_completion_index.md":"HuLSXfT2","zh-cn_completion_index.md":"CRcCabc9","zh-cn_index.md":"CTEpn9V-","en-us_index.md":"CI-biTWM","en-us_contribute_index.md":"BmN8Tggo"} diff --git a/docs/.vitepress/dist/zh-CN/command/index.html b/docs/.vitepress/dist/zh-CN/command/index.html index 2035f4a..da05515 100644 --- a/docs/.vitepress/dist/zh-CN/command/index.html +++ b/docs/.vitepress/dist/zh-CN/command/index.html @@ -18,7 +18,7 @@
Skip to content
  • 等待补充...
    • 可以使用 psc 触发补全,通过补全提示信息了解模块命令
    • 通过项目的 README 了解
    • 输入 psc 后 按下 enter,将会打印一些模块信息
- + \ No newline at end of file diff --git a/docs/.vitepress/dist/zh-CN/completion/index.html b/docs/.vitepress/dist/zh-CN/completion/index.html index 1db8507..da90c97 100644 --- a/docs/.vitepress/dist/zh-CN/completion/index.html +++ b/docs/.vitepress/dist/zh-CN/completion/index.html @@ -97,7 +97,7 @@ ] } ] - + \ No newline at end of file diff --git a/docs/.vitepress/dist/zh-CN/contribute/index.html b/docs/.vitepress/dist/zh-CN/contribute/index.html index a692fec..9becd06 100644 --- a/docs/.vitepress/dist/zh-CN/contribute/index.html +++ b/docs/.vitepress/dist/zh-CN/contribute/index.html @@ -18,7 +18,7 @@
Skip to content

关于 PR (Pull Request)

  1. 前提: 你应该先阅读 关于补全的 json 文件结构
  2. 你应该 fork PSCompletions 仓库,克隆到本地进行修改
  3. 只要到补全文件进行了修改,都需要更新其目录下的 guid.txt 文件
    • 你可以手动运行 New-Guid 生成,将值填入此文件中
    • 也可以直接运行 .\script\updateGuid.ps1,在弹出的 PowerShell 列表框中,选择此补全,并应用修改即可
  4. 修改完成后,提交并创建 PR

1. 更新 json 文件内容

  • 完善补全的一些提示信息(tip 属性)
  • 添加补全的一些缺失的命令
    • 可以通过 .\script\compareJson.ps1 脚本来查看未完成的部分
      • git 举例
      • 你可以使用以下命令查看 zh-CN.json 文件缺少的属性(相较于 en-US.json 文件)
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json .\completions\git\language\en-US.json
      • 如果是和 config.json 中配置的第一个语言对比,也可以省略第二个参数
        • 一般都是和第一个语言对比,所以以下命令是最常见的用法
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json

2. 添加语言

  1. 在项目的 completions 目录中找到你想要添加语言的补全
  2. 在其目录下的 config.json 文件中的 language 属性里添加像 zh-CN 这样的语言标识符
  3. language 目录下添加与语言标识符同名的 json 文件
    • 你可以将原有的一个 json 文件直接复制,改名即可
  4. 翻译其中的 tip 属性的内容即可

3. 添加一个全新的命令补全

  1. 在项目根目录下运行 .\script\create.ps1
    • 为了调试方便,create.ps1 会将创建的补全目录链接到实际 PSCompletionscompletions 目录下
      • 因此,必须先安装并导入 PSCompletions 模块,然后再运行 create.ps1
        • Install-Module PSCompletions -Scope CurrentUser
        • Import-Module PSCompletions
    • 当提交 PR 并被合并后,你应该使用 psc rm 移除掉此补全,并使用 psc add 重新添加
  2. 根据提示进行操作
  3. 修改新创建的补全
  4. 根据需求修改 config.json
- + \ No newline at end of file diff --git a/docs/.vitepress/dist/zh-CN/index.html b/docs/.vitepress/dist/zh-CN/index.html index c99a3bb..f29b3ad 100644 --- a/docs/.vitepress/dist/zh-CN/index.html +++ b/docs/.vitepress/dist/zh-CN/index.html @@ -18,7 +18,7 @@
Skip to content

PSCompletions

一个补全管理模块,它能让你在 PowerShell 中更简单、更方便地使用命令补全。

- + \ No newline at end of file diff --git a/en-US/command/index.html b/en-US/command/index.html index c5962af..e2a5dcc 100644 --- a/en-US/command/index.html +++ b/en-US/command/index.html @@ -18,7 +18,7 @@
Skip to content
  • Waiting...
    • You can trigger completion by running psc, then learn about them by completion tip.
    • View the README file of PSCompletions.
    • Enter 'psc' and press 'Enter' to print some module information
- + \ No newline at end of file diff --git a/en-US/completion/index.html b/en-US/completion/index.html index 1cd4fae..352040d 100644 --- a/en-US/completion/index.html +++ b/en-US/completion/index.html @@ -97,7 +97,7 @@ ] } ] - + \ No newline at end of file diff --git a/en-US/contribute/index.html b/en-US/contribute/index.html index 7d283e4..c65a3e1 100644 --- a/en-US/contribute/index.html +++ b/en-US/contribute/index.html @@ -18,7 +18,7 @@
Skip to content

About PR (Pull Request)

  1. Prerequisite: You should read About the structure of completion json file first.
  2. You should fork PSCompletions, and clone to your machine.
  3. After Changing, you should commit and create the PR.

1. Update the content of completion json file

  • Patch some tips of the completion.(tip attributes)
  • Add some missing parts for the completion.
    • The missing parts can be viewed by using the compareJson.ps1 script.
      • Take git for example.
      • You can view the missing parts of the zh-CN.json file (Compared to the en-US.json file) by using the following command.
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json .\completions\git\language\en-US.json
      • If it's compared to the first language configured in config.json, the second parameter can also be omitted.
        • It's usually compared to the first language, so the following commands are the most common usage.
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json

2. Add language

  1. In the completions directory, select the language you want to add.
  2. Add the language identifier to the language in the config.json file.
  3. Add a json file with the same name as the language identifier in the language directory.
    • You can copy the original json file and rename it.
  4. Translate the contents of the tip attribute.

3. Add a new completion

  1. Run it in the project root directory. .\script\create.ps1
    • For the convenience of debugging, create.ps1 will link the created completion directory to the completions directory of the PSCompletions module.
      • So PSCompletions module must be installed and imported before running create.ps1.
        • Install-Module PSCompletions -Scope CurrentUser
        • Import-Module PSCompletions
    • After the PR is committed and merged, you should use psc rm to remove this completion and psc add to re-add it.
  2. Follow the prompts.
  3. Modify the new completion.
  4. Modify config.json as required.
- + \ No newline at end of file diff --git a/en-US/index.html b/en-US/index.html index 2a3e357..6e4fecb 100644 --- a/en-US/index.html +++ b/en-US/index.html @@ -18,7 +18,7 @@
Skip to content

PSCompletions

A completion manager for better and simpler use completions in PowerShell.

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 37deb93..dcfc033 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"en-us_index.md":"CI-biTWM","en-us_contribute_index.md":"BmN8Tggo","zh-cn_command_index.md":"CoLKJbH5","zh-cn_contribute_index.md":"BXvYV-wY","en-us_command_index.md":"DQbFAMce","zh-cn_index.md":"CTEpn9V-","en-us_completion_index.md":"HuLSXfT2","zh-cn_completion_index.md":"CRcCabc9"} +{"zh-cn_command_index.md":"CoLKJbH5","en-us_command_index.md":"DQbFAMce","zh-cn_contribute_index.md":"BXvYV-wY","en-us_completion_index.md":"HuLSXfT2","zh-cn_completion_index.md":"CRcCabc9","zh-cn_index.md":"CTEpn9V-","en-us_index.md":"CI-biTWM","en-us_contribute_index.md":"BmN8Tggo"} diff --git a/zh-CN/command/index.html b/zh-CN/command/index.html index 2035f4a..da05515 100644 --- a/zh-CN/command/index.html +++ b/zh-CN/command/index.html @@ -18,7 +18,7 @@
Skip to content
  • 等待补充...
    • 可以使用 psc 触发补全,通过补全提示信息了解模块命令
    • 通过项目的 README 了解
    • 输入 psc 后 按下 enter,将会打印一些模块信息
- + \ No newline at end of file diff --git a/zh-CN/completion/index.html b/zh-CN/completion/index.html index 1db8507..da90c97 100644 --- a/zh-CN/completion/index.html +++ b/zh-CN/completion/index.html @@ -97,7 +97,7 @@ ] } ] - + \ No newline at end of file diff --git a/zh-CN/contribute/index.html b/zh-CN/contribute/index.html index a692fec..9becd06 100644 --- a/zh-CN/contribute/index.html +++ b/zh-CN/contribute/index.html @@ -18,7 +18,7 @@
Skip to content

关于 PR (Pull Request)

  1. 前提: 你应该先阅读 关于补全的 json 文件结构
  2. 你应该 fork PSCompletions 仓库,克隆到本地进行修改
  3. 只要到补全文件进行了修改,都需要更新其目录下的 guid.txt 文件
    • 你可以手动运行 New-Guid 生成,将值填入此文件中
    • 也可以直接运行 .\script\updateGuid.ps1,在弹出的 PowerShell 列表框中,选择此补全,并应用修改即可
  4. 修改完成后,提交并创建 PR

1. 更新 json 文件内容

  • 完善补全的一些提示信息(tip 属性)
  • 添加补全的一些缺失的命令
    • 可以通过 .\script\compareJson.ps1 脚本来查看未完成的部分
      • git 举例
      • 你可以使用以下命令查看 zh-CN.json 文件缺少的属性(相较于 en-US.json 文件)
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json .\completions\git\language\en-US.json
      • 如果是和 config.json 中配置的第一个语言对比,也可以省略第二个参数
        • 一般都是和第一个语言对比,所以以下命令是最常见的用法
        • .\script\compareJson.ps1 .\completions\git\language\zh-CN.json

2. 添加语言

  1. 在项目的 completions 目录中找到你想要添加语言的补全
  2. 在其目录下的 config.json 文件中的 language 属性里添加像 zh-CN 这样的语言标识符
  3. language 目录下添加与语言标识符同名的 json 文件
    • 你可以将原有的一个 json 文件直接复制,改名即可
  4. 翻译其中的 tip 属性的内容即可

3. 添加一个全新的命令补全

  1. 在项目根目录下运行 .\script\create.ps1
    • 为了调试方便,create.ps1 会将创建的补全目录链接到实际 PSCompletionscompletions 目录下
      • 因此,必须先安装并导入 PSCompletions 模块,然后再运行 create.ps1
        • Install-Module PSCompletions -Scope CurrentUser
        • Import-Module PSCompletions
    • 当提交 PR 并被合并后,你应该使用 psc rm 移除掉此补全,并使用 psc add 重新添加
  2. 根据提示进行操作
  3. 修改新创建的补全
  4. 根据需求修改 config.json
- + \ No newline at end of file diff --git a/zh-CN/index.html b/zh-CN/index.html index c99a3bb..f29b3ad 100644 --- a/zh-CN/index.html +++ b/zh-CN/index.html @@ -18,7 +18,7 @@
Skip to content

PSCompletions

一个补全管理模块,它能让你在 PowerShell 中更简单、更方便地使用命令补全。

- + \ No newline at end of file