diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-11 13:53:29 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-11 13:53:29 +0800 |
| commit | 9b1a5a0a97601b3e761730bb3ce011e14fcbdfc4 (patch) | |
| tree | 784bc178779a23034e4c0d6822e2900fdc946d01 /run.ps1 | |
| parent | 685f461e181a22b6112ab2ee3ed9caba46998c4b (diff) | |
Add version header 0.1.1 to both run.ps1 and run.sh
Diffstat (limited to 'run.ps1')
| -rw-r--r-- | run.ps1 | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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] |
