Add hook that loads a project.nu if it exists

main
Julius Riegel 7 months ago
parent 742d2d4850
commit 2a54d3e5af

@ -193,8 +193,14 @@ $env.config = {
}
direnv export json | from json | default {} | load-env
{{/if-installed}}
}]
{{/if-installed}}
}, {
condition: {|before, after| ("project.nu" in (overlay list)) and ($before == null or ($after not-in $before)) }
code: "overlay hide project.nu --keep-env [ PWD ]"
}, {
condition: {|before, after| ("./project.nu" | path exists) and ($before == null or ($after not-in $before)) },
code: "overlay use ./project.nu as project.nu"
}]
}
}
menus: [

@ -351,9 +351,14 @@ export def gc [
let m = $message | with-flag -m
$message | save -f .git/COMMIT_EDITMSG
git commit -v -e ...$m ...$a ...$n ...$k
} else {
let m = $message | with-flag -m
if $message != null {
$message | save -f .git/COMMIT_EDITMSG
}
git commit -v ...$m ...$a ...$n ...$k ...$e
}
}

Loading…
Cancel
Save