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