Skip to content

Instantly share code, notes, and snippets.

View brglng's full-sized avatar

Zhaosheng Pan brglng

View GitHub Profile
@brglng
brglng / config.nu
Last active May 22, 2025 06:37
Use Pixi in Nushell to replace direnv
$env.config = {
hooks: {
pre_prompt: [{
# Search for pixi.toml in the current directory and all parent directories
mut project_root = $env.PWD
while not ([$project_root, "pixi.toml"] | path join | path exists) {
let new_project_root = [$project_root, ".."] | path join | path expand -n
if $new_project_root == $project_root {
break
}