From ecf686576b9a27da9daac1e542fd00c96d81ab3d Mon Sep 17 00:00:00 2001 From: LinRan Date: Sat, 27 Dec 2025 20:58:51 +0800 Subject: [PATCH] =?UTF-8?q?docs(Python):=20=E6=B7=BB=E5=8A=A0Windows?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0uv=E9=85=8D=E7=BD=AE=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E6=B5=8B=E8=AF=95=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recipe/lang/Python/rawstr4c.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/recipe/lang/Python/rawstr4c.md b/src/recipe/lang/Python/rawstr4c.md index f1c8676..7f87b61 100644 --- a/src/recipe/lang/Python/rawstr4c.md +++ b/src/recipe/lang/Python/rawstr4c.md @@ -45,6 +45,12 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p' @sed@ '/^\[\[index\]\]$/,/^default = true$/{s|^url = ".*"$|url = "@url@"|;}' @f@ ``` +### Set uv config on Windows + +```powershell +powershell -Command "$content = Get-Content '@f@'; $content = $content -replace '^url = \".*\"$', 'url = \"@url@\"'; $content | Set-Content '@f@'" +``` + ### Test uv if set source @@ -52,6 +58,12 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p' grep -q '^\[\[index]]$' @f@ ``` +### Test uv if set source on Windows + +```powershell +powershell -Command "if (Get-Content @f@ | Select-String '^\[\[index\]\]$') { exit 0 } else { exit 1 }" +``` +
@@ -64,4 +76,4 @@ grep -q '^\[\[index]]$' @f@ [[sources]] name = "@1@" url = "@2@" -``` +``` \ No newline at end of file