From cd39d205f19c5689affbebcae0c26f81ddad1db2 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 11 Jul 2026 13:56:06 +0800 Subject: feat(run): update `.run` to 0.1.1 --- run.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'run.ps1') diff --git a/run.ps1 b/run.ps1 index af8effe..f0b575d 100644 --- a/run.ps1 +++ b/run.ps1 @@ -8,6 +8,8 @@ # You can go to [https://catilgrass.github.io/run] to install it # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# Version: 0.1.1 + Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ErrorAction Stop $tools = @{} @@ -73,7 +75,7 @@ if (Test-Path ".run/src/bin/*.zig") { } if ($args.Count -eq 0) { - $sorted = @($tools.Keys | Sort-Object @{Expression={if ($tools[$_].Type -eq 'ps1') {0} else {1}}}, {$_}) + $sorted = @($tools.Keys | Sort-Object @{Expression={if ($_[0] -cmatch '[A-Z]') {0} else {1}}}, @{Expression={if ($tools[$_].Type -eq 'ps1') {0} else {1}}}, {$_}) $total = $sorted.Count $num_w = $total.ToString().Length @@ -120,7 +122,7 @@ if ($args.Count -eq 0) { $target_name = $args[0] if ($target_name -match '^\d+$') { - $sorted = @($tools.Keys | Sort-Object @{Expression={if ($tools[$_].Type -eq 'ps1') {0} else {1}}}, {$_}) + $sorted = @($tools.Keys | Sort-Object @{Expression={if ($_[0] -cmatch '[A-Z]') {0} else {1}}}, @{Expression={if ($tools[$_].Type -eq 'ps1') {0} else {1}}}, {$_}) $idx = [int]$target_name - 1 if ($idx -ge 0 -and $idx -lt $sorted.Count) { $target_name = $sorted[$idx] -- cgit