Skip to contentAbout PR (Pull Request)
- Prerequisite: You should read About the structure of completion json file first.
- You should fork PSCompletions, and clone to your machine.
- 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
compare-json.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. .\scripts\compare-json.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. .\scripts\compare-json.ps1 .\completions\git\language\zh-CN.json
2. Add language
- In the
completions
directory, select the language you want to add. - Add the language identifier to the language in the
config.json
file. - 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.
- Translate the contents of the
tip
attribute.
3. Add a new completion
- Run it in the project root directory.
.\scripts\create-completion.ps1
- For the convenience of debugging,
create-completion.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-completion.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.
- Follow the prompts.
- Modify the new completion.
- Modify
config.json
as required.