Add Nushell brew and uv helpers

This commit is contained in:
2026-05-31 01:04:45 +08:00
parent 39f94d1c1f
commit 7b4c13791c
3 changed files with 42 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
export def --env "pj uvthu" [] {
let os_name = ($nu.os-info.name? | default "" | into string | str downcase)
if not (($os_name | str contains "darwin") or ($os_name | str contains "macos")) {
return
}
let uv_index_url = ($env.UV_INDEX_URL? | default "")
if ($uv_index_url | is-empty) {
load-env {
UV_INDEX_URL: "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/"
}
} else {
hide-env UV_INDEX_URL
}
}