Skip to content

Commit

Permalink
feat(completions): update psc
Browse files Browse the repository at this point in the history
  • Loading branch information
abgox committed Aug 18, 2024
1 parent 32e05d5 commit 4feae6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion completions/psc/guid.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e3fc0933-4ae6-4d9c-8c04-4480dd8d5929
fad88b4e-98d7-4c9f-8ec1-2dfb6ea11cbf
11 changes: 5 additions & 6 deletions completions/psc/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1361,14 +1361,13 @@
"(The added completion will be automatically migrated.)\n",
"<@Magenta>{{ $PSCompletions.version }}<@Cyan> => <@Magenta>{{ $PSCompletions.config.module_update }}\n<@Cyan>",
"{{ ",
"$log=($PSCompletions.get_raw_content(\"$($PSCompletions.path.core)\\log.json\") | ConvertFrom-Json).PSObject.Properties;",
"$version_list=$PSCompletions.get_raw_content(\"$($PSCompletions.path.core)\\CHANGELOG.json\") | ConvertFrom-Json;",
"$lang = if($PSCompletions.language -eq 'zh-CN'){ 'zh-CN' }else{ 'en-US' };",
"$num=1;",
"$log | ForEach-Object {",
" if($_.Name -gt $PSCompletions.version){",
" if($num){ \"<@Blue>$($_.Name) : $($_.Value.$($lang))\";$num = 0 }",
" else{ \"`n $($_.Name) : $($_.Value.$($lang))\" }",
" }",
"foreach($_ in $version_list) {",
" if($_.version -eq $PSCompletions.version){ break }",
" if($num){ \"<@Blue>$($_.version) : $($_.info.$($lang))\";$num = 0 }",
" else{ \"`n $($_.version) : $($_.info.$($lang))\" }",
"}",
"}}\n",
"<@Cyan>Press <@Magenta>Enter<@Cyan> key to update or <@Magenta>other key<@Cyan> to cancel!"
Expand Down
11 changes: 5 additions & 6 deletions completions/psc/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1315,14 +1315,13 @@
"<@Yellow>PSCompletions 模块有更新了, 是否更新?(已添加的补全会自动迁移)\n",
"<@Magenta>{{ $PSCompletions.version }}<@Cyan> => <@Magenta>{{ $PSCompletions.config.module_update }}\n<@Cyan>",
"{{ ",
"$log=($PSCompletions.get_raw_content(\"$($PSCompletions.path.core)\\log.json\") | ConvertFrom-Json).PSObject.Properties;",
"$version_list=$PSCompletions.get_raw_content(\"$($PSCompletions.path.core)\\CHANGELOG.json\") | ConvertFrom-Json;",
"$lang = if($PSCompletions.language -eq 'zh-CN'){ 'zh-CN' }else{ 'en-US' };",
"$num=1;",
"$log | ForEach-Object {",
" if($_.Name -gt $PSCompletions.version){",
" if($num){ \"<@Blue>$($_.Name) : $($_.Value.$($lang))\";$num = 0 }",
" else{ \"`n $($_.Name) : $($_.Value.$($lang))\" }",
" }",
"foreach($_ in $version_list) {",
" if($_.version -eq $PSCompletions.version){ break }",
" if($num){ \"<@Blue>$($_.version) : $($_.info.$($lang))\";$num = 0 }",
" else{ \"`n $($_.version) : $($_.info.$($lang))\" }",
"}",
"}}\n",
"<@Cyan>按下 <@Magenta>Enter(回车键)<@Cyan> 进行更新,<@Magenta>其他任意键<@Cyan>取消更新!"
Expand Down

0 comments on commit 4feae6a

Please sign in to comment.