Skip to content

Commit

Permalink
Merge pull request #62 from abgox/module
Browse files Browse the repository at this point in the history
fix(module): update version to 5.2.2
  • Loading branch information
abgox authored Dec 18, 2024
2 parents db689ed + bec9298 commit 1f3ea13
Show file tree
Hide file tree
Showing 45 changed files with 634 additions and 512 deletions.
2 changes: 1 addition & 1 deletion completions/git/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7991dd41-c069-4802-ae24-9418a129e5f7
d728e74d-6a4b-4928-a63f-82e56281a087
14 changes: 1 addition & 13 deletions completions/git/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2861,18 +2861,6 @@
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}\n",
"If you disable it, the <@Magenta>max_commit<@Blue> configuration will also be invalid."
]
},
{
"name": "max_commit",
"value": 20,
Expand All @@ -2885,7 +2873,7 @@
"$_value = $PSCompletions.config.comp_config.git.max_commit;",
"if($_value -ne $null){ \"Current Value: <@Magenta>$_value<@Blue>`n\" }",
"}}",
"The maximum number that can be parsed for a project commit. Default to <@Magenta>20<@Blue>.\n",
"The maximum number that can be parsed for a project commit by the hooks. Default to <@Magenta>20<@Blue>.\n",
"If it is <@Magenta>-1<@Blue>, all commits will be parsed, which may affect the loading speed."
]
}
Expand Down
14 changes: 1 addition & 13 deletions completions/git/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2860,18 +2860,6 @@
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}\n",
"如果禁用它,那么 <@Magenta>max_commit<@Blue> 配置也将无效。"
]
},
{
"name": "max_commit",
"value": 20,
Expand All @@ -2884,7 +2872,7 @@
"$_value = $PSCompletions.config.comp_config.git.max_commit;",
"if($_value -ne $null){ \"当前值: <@Magenta>$_value<@Blue>`n\" }",
"}}",
"可以为当前项目解析的 commit 的最大数量,默认为 <@Magenta>20<@Blue>。\n",
"通过 hooks 可以为当前项目解析的 commit 的最大数量,默认为 <@Magenta>20<@Blue>。\n",
"如果设置为 <@Magenta>-1<@Blue>, 会解析所有 commit,这对补全加载速度有影响。"
]
}
Expand Down
2 changes: 1 addition & 1 deletion completions/npm/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
99fd7d6e-a782-4b65-bd8f-1cdb1aa62578
41098a08-a1dc-475e-bf76-736150c5f7f1
15 changes: 1 addition & 14 deletions completions/npm/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,5 @@
"npm - package manager."
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
15 changes: 1 addition & 14 deletions completions/npm/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,5 @@
"npm - 软件包管理器。"
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
2 changes: 1 addition & 1 deletion completions/pnpm/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5141ba32-8a2b-48d4-bea3-f001928929e1
aa22a111-6ed6-472f-88ba-65d344325ae9
15 changes: 1 addition & 14 deletions completions/pnpm/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,5 @@
"pnpm - Package Manager."
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
15 changes: 1 addition & 14 deletions completions/pnpm/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,5 @@
"pnpm - 软件包管理器。"
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
2 changes: 1 addition & 1 deletion completions/psc/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59eaae10-2515-461d-9140-505c2a9da2d9
556e9d2e-e157-4bd9-8d97-d81af2905cbd
16 changes: 16 additions & 0 deletions completions/psc/hooks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ function handleCompletions([array]$completions) {
2 {
$tempList += $PSCompletions.return_completion("language", $PSCompletions.replace_content($PSCompletions.info.completion.language.tip), @('SpaceTab'))
$tempList += $PSCompletions.return_completion("enable_tip", $PSCompletions.replace_content($PSCompletions.info.completion.enable_tip.tip), @('SpaceTab'))

if ($PSCompletions.config.comp_config[$completion].Count) {
if ($PSCompletions.config.comp_config[$completion].keys.Contains('enable_hooks')) {
$tip = $PSCompletions.replace_content($PSCompletions.info.completion.enable_hooks.tip) -replace '<@\w+>', ''
$tempList += $PSCompletions.return_completion('enable_hooks', $tip, $symbol)
}
}
foreach ($c in $json.config) {
$config_item = $c.name
$tip = $PSCompletions.replace_content($c.tip) -replace '<\@\w+>', ''
Expand All @@ -161,6 +168,15 @@ function handleCompletions([array]$completions) {
$tempList += $PSCompletions.return_completion('1', $PSCompletions.replace_content($PSCompletions.info.completion.enable_tip.tip_v1))
$tempList += $PSCompletions.return_completion('0', $PSCompletions.replace_content($PSCompletions.info.completion.enable_tip.tip_v0))
}
'enable_hooks' {
if ($PSCompletions.config.comp_config[$completion].Count) {
if ($PSCompletions.config.comp_config[$completion].keys.Contains('enable_hooks')) {
foreach ($value in 0..1) {
$tempList += $PSCompletions.return_completion($value, $PSCompletions.replace_content($PSCompletions.info.completion.tip_v))
}
}
}
}
Default {
$c = $json.config.Where({ $_.name -eq $filter_input_arr[2] })
foreach ($value in $c.values) {
Expand Down
31 changes: 12 additions & 19 deletions completions/psc/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1503,9 +1503,12 @@
"}}\n",
"Completion file directory: <@Blue>{{ $completion_dir }}\n",
"{{",
" if($json.config){",
" if($json.config -or $config.hooks -ne $null){",
"\"<@Blue>---------- The special configuration of $($completion)---------- \";",
" $config_list=$json.config | ForEach-Object {",
"$configList = @();",
"if($config.hooks -ne $null){$configList += @{name='enable_hooks';value=[int]$config.hooks;tip=$PSCompletions.info.completion.enable_hooks.tip};};",
"if($json.config){$configList += $json.config;};",
" $config_list = $configList | ForEach-Object {",
" \"`n<@Magenta>$($_.name)<@Blue>:`nDefault Value: $($_.value)`n$($PSCompletions.replace_content($_.tip))\" ",
" };",
" $config_list -join \"`n\";",
Expand Down Expand Up @@ -1556,9 +1559,12 @@
"}}\n",
"Completion file directory: <@Blue>{{ $completion_dir }}\n",
"{{",
"if($json.config){",
" if($json.config -or $config.hooks -ne $null){",
"\"<@Blue>---------- The special configuration of $($completion)---------- \";",
" $config_list=$json.config | ForEach-Object {",
"$configList = @();",
"if($config.hooks -ne $null){$configList += @{name='enable_hooks';value=[int]$config.hooks;tip=$PSCompletions.info.completion.enable_hooks.tip};};",
"if($json.config){$configList += $json.config;};",
" $config_list = $configList | ForEach-Object {",
" \"`n<@Magenta>$($_.name)<@Blue>:`nDefault Value: $($_.value)`n$($PSCompletions.replace_content($_.tip))\" ",
" };",
" $config_list -join \"`n\";",
Expand Down Expand Up @@ -1795,7 +1801,7 @@
"$_value = $PSCompletions.config.comp_config.$completion.enable_hooks;",
"if($_value -ne $null){ \"Current Value: <@Magenta>$_value<@Blue>`n\" }",
"}}",
"Set whether to enable hooks. Default to <@Magenta>1<@Blue>.\n",
"Set whether to enable hooks.\n",
"The hooks will parse or generate some completion data and add them dynamically.\n",
"You can disable it by running the command (<@Magenta>psc completion {{ $completion }} enable_hooks 0<@Blue>)."
]
Expand Down Expand Up @@ -1925,18 +1931,5 @@
]
}
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
31 changes: 12 additions & 19 deletions completions/psc/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1512,9 +1512,12 @@
"}}\n",
"补全文件所在目录: <@Blue>{{ $completion_dir }}\n",
"{{",
"if($json.config){",
"if($json.config -or $config.hooks -ne $null){",
" \"<@Blue>---------- $($completion) 补全特殊配置 ---------- \";",
" $config_list=$json.config | ForEach-Object {",
"$configList = @();",
"if($config.hooks -ne $null){$configList += @{name='enable_hooks';value=[int]$config.hooks;tip=$PSCompletions.info.completion.enable_hooks.tip};};",
"if($json.config){$configList += $json.config;};",
" $config_list = $configList | ForEach-Object {",
" \"`n<@Magenta>$($_.name)<@Blue>:`n默认值: $($_.value)`n$($PSCompletions.replace_content($_.tip))\"",
" };",
" $config_list -join \"`n\";",
Expand Down Expand Up @@ -1565,9 +1568,12 @@
"}}\n",
"补全文件所在目录: <@Blue>{{ $completion_dir }}\n",
"{{",
"if($json.config){",
"if($json.config -or $config.hooks -ne $null){",
" \"<@Blue>---------- $($completion) 补全特殊配置 ---------- \";",
" $config_list=$json.config | ForEach-Object {",
"$configList = @();",
"if($config.hooks -ne $null){$configList += @{name='enable_hooks';value=[int]$config.hooks;tip=$PSCompletions.info.completion.enable_hooks.tip};};",
"if($json.config){$configList += $json.config;};",
" $config_list = $configList | ForEach-Object {",
" \"`n<@Magenta>$($_.name)<@Blue>:`n默认值: $($_.value)`n$($PSCompletions.replace_content($_.tip))\"",
" };",
" $config_list -join \"`n\";",
Expand Down Expand Up @@ -1804,7 +1810,7 @@
"$_value = $PSCompletions.config.comp_config.$completion.enable_hooks;",
"if($_value -ne $null){ \"当前值: <@Magenta>$_value<@Blue>`n\" }",
"}}",
"设置是否启用 hooks,默认为 <@Magenta>1<@Blue>\n",
"设置是否启用 hooks。\n",
"hooks 将解析或生成补全数据,然后动态添加到命令补全中。\n",
"你可以通过运行 <@Magenta>psc completion {{ $completion }} enable_hooks 0<@Blue> 来禁用它。"
]
Expand Down Expand Up @@ -1934,18 +1940,5 @@
]
}
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
2 changes: 1 addition & 1 deletion completions/scoop/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0f821390-b8db-48a3-8545-727484c11633
32669e0d-e174-442a-a5f5-3f4df843c40d
15 changes: 1 addition & 14 deletions completions/scoop/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -838,18 +838,5 @@
]
}
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
15 changes: 1 addition & 14 deletions completions/scoop/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -836,18 +836,5 @@
]
}
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
2 changes: 1 addition & 1 deletion completions/volta/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
39f6401d-5557-408f-b8f1-bd370cc5b7fe
8c5a3a06-2ebc-42a0-84c4-ca144439302f
15 changes: 1 addition & 14 deletions completions/volta/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,5 @@
"volta - Accessible JavaScript Tool Manager."
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
15 changes: 1 addition & 14 deletions completions/volta/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,5 @@
"volta - 无障碍 JavaScript 工具管理器。"
]
}
},
"config": [
{
"name": "enable_hooks",
"value": 1,
"values": [
1,
0
],
"tip": [
"{{ $PSCompletions.info.completion.enable_hooks.tip }}"
]
}
]
}
}
2 changes: 1 addition & 1 deletion completions/wsl/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7a7da543-2de0-4549-a1fd-336be3f3b5d1
92545ca7-d936-4265-923a-24d8880aa0e2
Loading

0 comments on commit 1f3ea13

Please sign in to comment.